I am using Rest Assured for testing API
WHEN I post a request for authentication, the error occurs to say that: "java.lang.IllegalArgumentException: Cannot serialize because cannot determine how to serialize content-type application/x-www-form-urlencoded;charset=UTF-8"
Here is my test method
@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);
}