title: RestAssured, unable to pass objects of POJO for nested json in io.RestAssured
body: <p>Here is my Jsonbody that I want to post, and I created POJO for child node such as Phone, fax along with the Info (parent node). I can't get the child node elements, the info elements work just fine. </p>
  
  <pre><code>info
          {
            "Name": "Auto Test",
            "addressLine1": "4399 Apple ln",
            "city": "BlahWonders",
            "state": "GA",
            "zipCode": "30555",
            "phone": {
              "countryCode": "1",
              "areaCode": "678",
              "dialNumber": "3196864"
            },
            "fax": {
              "countryCode": "1",
              "nationalPrefix": "1",
              "areaCode": "333",
              "dialNumber": "3333333"
            },
  
      }
  </code></pre>
  
  <p>I created POJO class for the respecive classes Info, phone, fax. 
  I created a new object for each setting the values in each class. ofcourse my Info class has the following:</p>
  
  <pre><code>private String name;
  private String addressLine1;
  private String city;
  private String state;
  private String zipCode;
  private HashMap&lt;String,Phone&gt; phone;
  private HashMap&lt;String,Fax&gt; fax;
  Info info = new Info();
          Phone phone = new Phone();
          phone.setAreaCode("333");
          phone.setCountryCode("");
          phone.setDialNumber("666666");
          Fax fax = new Fax();
          fax.setAreaCode("555");
          fax.setCountryCode("usa");
          fax.setDialNumber("9999999");
          HashMap&lt;String,Fax&gt; faxMap= new HashMap&lt;String,Fax&gt;();
          faxMap.put("fax",fax);
          HashMap&lt;String,Phone&gt; phoneMap= new HashMap&lt;String,Phone&gt;();
          phoneMap.put("phone",phone);
          info.setFax(faxMap);
          info.setPhone(phoneMap);
  .
  .
  .
  .
  </code></pre>
  
  <p>RestAssured validation for post: I get 400</p>
  
  <pre><code>given().contentType("application/json").body(info).when().post("/info/add");
  </code></pre>
  
  <p>Can someone tell whats wrong with this? I tried the same in postman and it works. I get an error "Unrecognized property 'phone' </p>