title: Rest Assured - Cannot serialize because cannot determine how to serialize content-type
body: <p>I am using <strong>Rest</strong> Assured for testing <strong>API</strong></p>
  
  <p>WHEN I post a request for <strong>authentication</strong>, the error occurs to say that: <code>"java.lang.IllegalArgumentException: Cannot serialize because cannot determine how to serialize content-type application/x-www-form-urlencoded;charset=UTF-8"</code></p>
  
  <p>Here is my test method</p>
  
  <pre><code> @Test
  public void authenticate()
  {
      AuthenDto authenDto = new AuthenDto("username","password","false","Login");
      given()
              .contentType("application/x-www-form-urlencoded;charset=UTF-8")
              .accept("application/json, text/plain, */*")
              .body(authenDto)
      .when()
              .post("ENDPOINT")
      .then()
              .statusCode(200);
  }
  </code></pre>