I\'m doing an integration test against a REST controller POST handler. Well, I\'m trying to.
It gives me the HttpMessageNotReadableException exception: Could not rea
In my opinion the problem is with content format. Your endpoint expect that data will be sent as application/json but in test you send it as application/x-www-form-urlencoded (it doesn't matter that you set proper content type header in request). Try to send admin object in json format (as a body of a request):
{
"firstname" : "Stephane",
"lastname" : "Eybert",
"login" : "stephane",
"password" : "toto"
}
BTW the /admin/crud does not fallow REST resource addressing rules, you should change it to /admin. The crud (CREATE, READ, UPDATE, DELETE) will map to HTTP methods (POST, GET, PUT, DELETE)