I'd like to test a find rest service, if I find smth I want to delete from the database, otherwise do nothing
I use it like this (where rs is the Response from find)
JsonPath jsonPath = rs.getBody().jsonPath();
Object foundName= jsonPath.get("name");
if (foundName!= null) {
expect().statusCode(200).when().delete("..." + foundName);
}
So when nothing is found how to check the foundName for it , because I tried foundName!=null or foundName != "", and still it's not working. So please explain what is the structure of an empty response body