title: Need help in REST ASSURED
body: <p>I am starting with REST Assured, getting error while executing below code :</p>
  
  <p><strong>Code 1-</strong> </p>
  
  <pre><code> RestAssured.expect().statusCode(200).
          body(
                "name", equalTo("Russia")
                  ).
              when().
                  get("http://restcountries.eu/rest/v1/callingcode/7");
  </code></pre>
  
  <p>Exception-</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
      The method equalTo(String) is undefined for the type
  </code></pre>
  
  <p><strong>Code 2 -</strong></p>
  
  <pre><code>    RestAssured.expect().statusCode(200).
          body(
                "name", Matchers.equalTo("Russia")
                  ).
              when().
                  get("http://restcountries.eu/rest/v1/callingcode/7");
  </code></pre>
  
  <p>Exception-</p>
  
  <pre><code>Exception in thread "main" groovy.lang.MissingMethodException: No signature of method: com.jayway.restassured.internal.ContentParser.parse() is applicable for argument types: (com.jayway.restassured.internal.RestAssuredResponseImpl, com.jayway.restassured.internal.ResponseParserRegistrar, com.jayway.restassured.config.RestAssuredConfig, java.lang.Boolean) values: [com.jayway.restassured.internal.RestAssuredResponseImpl@753455ab, ...] Possible solutions: wait(), any(), grep()
  </code></pre>
  
  <hr>
  
  <p>Below are the only 2 methods in my class, I am having issue with first one, second one is running fine. Please let me know what I am missing in first method.</p>
  
  <p><strong>Method -1</strong></p>
  
  <pre><code>public static void testCountriesCallingCode() {     
      RestAssured.expect().statusCode(200).
          body(
                "name", equalTo("Russia")
                  ).
              when().
                  get("http://restcountries.eu/rest/v1/callingcode/7");
      System.out.println(RestAssured.get("http://restcountries.eu/rest/v1/callingcode/7").asString());
  }
  </code></pre>
  
  <p><strong>Method-2</strong></p>
  
  <pre><code>public static void testCountriesCallingCodeUsingJSONPATH(){
      Response res = RestAssured.get("http://restcountries.eu/rest/v1/callingcode/7");
      System.out.println(res.getStatusCode());
      String json = res.asString();
      JsonPath jp = new JsonPath(json);
      System.out.println(jp.get("name"));
  }
  </code></pre>