Foo foo = new Foo("123");
request.body("application/foo", foo);
request.accept(MediaType.APPLICATION_XML);
ClientResponse<?> response = request.post(Foo.class);
Assert.assertEquals(500, response.getStatus());
ViolationReport report = response.getEntity(ViolationReport.class);
System.out.println("report: " + report);
countViolations(report, 1, 0, 0, 0, 0, 1);
ResteasyConstraintViolation cv = report.getReturnValueViolations().iterator().next();
System.out.println("message: " + cv.getMessage());
System.out.println("value: " + cv.getValue());
Assert.assertEquals("s must have length: 4 <= length <= 5", cv.getMessage());
Assert.assertEquals(foo.toString(), cv.getValue());
}