in RestAssured based integration tests I get the following response:
{
"status": "UP",
"checks": [
{
"name": "boot-errors",
"status": "UP"
},
{
"name": "server-state",
"status": "UP",
"data": {
"value": "running"
}
},
...
]
}
I need to check weather this response contains "server-state" for example. I did this:
.body("name", everyItem(hasItem("server-state")))
or
.body("checks", everyItem(hasItem("server-state")))
but none has worked, they made both fail the integration test. How can I do that ? Sorry but I don't understand the Hamcrest matcher syntax and I don't find a clear documentation.
Many thanks in advance.
Kind regards,
Seymour