// request.accept(MediaType.APPLICATION_XML);
// ClientResponse<?> response = request.get(ViolationReport.class);
// ViolationReport report = response.getEntity(ViolationReport.class);
ClientResponse<?> response = request.get();
String report = response.getEntity(String.class);
ResteasyViolationException e = new ResteasyViolationException(String.class.cast(report));
log.info("status: " + response.getStatus());
log.info("entity: " + report);
assertEquals(400, response.getStatus());
// countViolations(report, 1, 0, 0, 0, 1, 0);
// ResteasyConstraintViolation cv = report.getParameterViolations().iterator().next();
countViolations(e, 1, 0, 0, 0, 1, 0);
ResteasyConstraintViolation cv = e.getParameterViolations().iterator().next();
Assert.assertTrue(cv.getMessage().equals("must be greater than or equal to 11"));
}