### Question:
StellaMaxValidator implements ConstraintValidator<Max, Number> { public boolean isValid(final Number object, ConstraintValidatorContext context) { if (object == null) { return true; } if (!acceptedTypes.contains(object.getClass())) { throw new IllegalStateException(Max.class.getSimpleName() + " cannot be used to annotate a field of type " + object.getClass().getName() + ". Only " + Arrays.toString(acceptedTypes.toArray()) + " are accepted."); } Long val = Long.parseLong(object.toString()); if (val > annotation.value()) { return false; } return true; }  void initialize(final Max annotation); boolean isValid(final Number object, ConstraintValidatorContext context);  }### Answer:
@Test public void testThatNullIsValid() { StellaMaxValidator validator = new StellaMaxValidator(); Assert.assertTrue(validator.isValid(null,context)); }