### Question:
NullValidator implements ConstraintValidator<Null, Object> { @Override public boolean isValid(Object object, ConstraintValidatorContext context) { return object == null; }  @Override boolean isValid(Object object, ConstraintValidatorContext context);  }### Answer:
@Test public void testNullValidator() { NullValidator nv = new NullValidator(); assertTrue("Null value validation must succeed", nv.isValid(null, null)); assertFalse("Non null value validation must fail", nv.isValid("hello", null)); }