entity.setLongValue(301);
entity.setDecimalValue(new BigDecimal(401));
Set<ConstraintViolation<MaxTestEntity>> violations = validator.validate(entity);
assertEquals(4, violations.size());
NoValidatorTestEntity entity2 = new NoValidatorTestEntity();
try {
validator.validate(entity2);
fail("UnexpectedTypeException expected but not thrown");
} catch (UnexpectedTypeException ex) {
// we expected this