log.info("status: " + response.getStatus());
log.info("entity: " + answer);
assertEquals(400, response.getStatus());
ResteasyViolationException e = new ResteasyViolationException(String.class.cast(answer));
countViolations(e, 3, 1, 1, 1, 0, 0);
ResteasyConstraintViolation cv = e.getFieldViolations().iterator().next();
Assert.assertTrue(cv.getMessage().equals("must be greater than or equal to 3"));
cv = e.getPropertyViolations().iterator().next();
Assert.assertTrue(cv.getMessage().equals("must be greater than or equal to 5"));
cv = e.getClassViolations().iterator().next();
Assert.assertTrue(cv.getMessage().indexOf("org.jboss.resteasy.ejb.validation.SumConstraint") > 0);
}