assertNotNull("resp.metadata shouldn't be null", resp.getMetadata());
Object contentType = resp.getMetadata().getFirst(HttpHeaderNames.CONTENT_TYPE);
assertNotNull("resp.entity shouldn't be null", contentType);
assertEquals("contentType should be application/xml but is" + contentType, contentType, MediaType.APPLICATION_XML);
assertTrue("entity should be of type ListOptionsDTO", entity instanceof ListValidationsDTO);
ListValidationsDTO dto = (ListValidationsDTO) entity;
List<ValidationDTO> validations = dto.getValidation();
assertNotNull("validations shouldn't be null", validations);
assertFalse("validations shouldn't be empty", validations.isEmpty());
assertEquals("validations should have " + retval.size() + " elements but has " + validations.size(), validations.size(), retval.size());
}