title: Connection reset in test using REST-assured
body: <p>I have a test with the use of REST-assured. In this test when I pass full host and path to get() method, everything goes fine, test passes. But when I try to use RestAssured.baseURI and RestAssured.basePath like it's shown in this part of the tutorial: <a href="http://code.google.com/p/rest-assured/wiki/Usage#Default_values" rel="nofollow">http://code.google.com/p/rest-assured/wiki/Usage#Default_values</a>, test ends up with Connection reset. Below I paste working version and version with baseURI which doesn't work, and the error I get. Help please :></p>
  
  <p>Working version:</p>
  
  <pre><code>import com.jayway.restassured.RestAssured;
  import org.testng.annotations.DataProvider;
  import org.testng.annotations.Test;
  
  import java.util.Iterator;
  
  import static com.jayway.restassured.RestAssured.basic;
  import static com.jayway.restassured.RestAssured.given;
  import static org.hamcrest.Matchers.containsString;
  
  public class SomeTest {
  
      @Test(dataProvider = "provideData")
      public void doSomeTest(String someParameter, String someExpectedValue) {
  
          given().
                  auth().basic("login", "pass").
                  param("someParameter", someParameter).
          when().
                  get("http://some.host/some-base-path/some-path-relevant-in-test").
          then().
                  statusCode(200).
                  body("some json", containsString(someExpectedValue)).
                  log().ifError();
      }
  
      @DataProvider(name = "provideData")
      public Iterator&lt;Object[]&gt; provideData() {
  
          //this provides data for test method in irrelevant way
      }
  
  }
  </code></pre>
  
  <p>Not working version which results in Connection reset:</p>
  
  <pre><code>import com.jayway.restassured.RestAssured;
  import org.testng.annotations.DataProvider;
  import org.testng.annotations.Test;
  
  import java.util.Iterator;
  
  import static com.jayway.restassured.RestAssured.basic;
  import static com.jayway.restassured.RestAssured.given;
  import static org.hamcrest.Matchers.containsString;
  
  public class SomeTest {
  
      @Test(dataProvider = "provideData")
          public void doSomeTest(String someParameter, String someExpectedValue) {
  
          RestAssured.baseURI = "http://some.host";
          RestAssured.basePath = "/some-base-path";
  
          given().
                  auth().basic("login", "pass").
                  param("someParameter", someParameter).
          when().
                  get("/some-path-relevant-in-test").
          then().
                  statusCode(200).
                  body("some json", containsString(someExpectedValue)).
                  log().ifError();
      }
  
      @DataProvider(name = "provideData")
      public Iterator&lt;Object[]&gt; provideData() {
  
          //this provides data for test method in irrelevant way
      }
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>mar 19, 2014 10:26:01 AM org.apache.http.impl.client.DefaultRequestDirector tryExecute
  INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset
  mar 19, 2014 10:26:01 AM org.apache.http.impl.client.DefaultRequestDirector tryExecute
  INFO: Retrying request
  </code></pre>
  
  <p>What am I doing wrong? :(</p>