I'm using RestAssured to test an API.
I have the following, wow can I test the post method?
{
"name": "Test",
"email": "test@email.com",
"occupation": [{
"id": 1,
"feature": {
"id": 2
},
"company": 7777,
}]
}
"Occupation" is another table, how can I on both tables? I have tried this:
.body("{\"name\": \"test\", \"email\": \"test@email.com\", \"occupation\": {\"id\": 15, \"feature\": {\"id\": 15}", \"company\": \"7777\"}}")
But the error
"Can not deserialize instance of java.util.ArrayList out of START_OBJECT token"
is shown.