title: Empty respond body for post with rest assured
body: <p>I am using restassured with junit4. In my test method i create a object in mongodb and when i run the test it successfully persist also. But i need to store the id created so i try to get the respond body. But the <code>response.getBody().asString()</code> is empty.</p>
  
  <pre><code>@Test
  public void testA() throws JSONException {
  
      Map&lt;String,Object&gt; createVideoAssignmentParm = new HashMap&lt;String,Object&gt;();
      createVideoAssignmentParm.put("test1", "123");
  
      Response response = expect().statusCode(201).when().given().contentType("application/json;charset=UTF-8")
              .headers(createVideoAssignmentParm).body(assignment).post("videoAssignments");
      JSONObject jsonObject = new JSONObject(response.getBody().asString());
      id= (String)jsonObject.getString("assignmentId");
  }
  </code></pre>
  
  <p>When i invoke the rest end point externally, it returns the response body also with relevant fields so no problem with the rest API.</p>
  
  <p>If no answer for above question then how would you guys test a post with return body using rest assured so that i can try that way.</p>
  
  <p>My controller method looks like,</p>
  
  <pre><code> @RequestMapping(value = "/videoAssignment", produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE, method = RequestMethod.POST)
   @ResponseBody
   public HttpEntity&lt;VideoAssignment&gt; createVideoAssingnment(
    //@ApiParam are there..){
  
      //other methods
      return new ResponseEntity&lt;&gt;(va, HttpStatus.CREATED);
   }
  </code></pre>