### Question:
ServiceNotNullValidator implements ConstraintValidator<ServiceNotNull, Object> { @Override public boolean isValid(Object value, ConstraintValidatorContext context) { return value != null; }  @Override boolean isValid(Object value, ConstraintValidatorContext context);  }### Answer:
@Test public void testObjectIsNull() { assertFalse(new ServiceNotNullValidator().isValid(null, null)); }
@Test public void testObjectIsNotNull() { assertTrue(new ServiceNotNullValidator().isValid(new Object(), null)); }