NullValuePredicate implements ValuePredicate<Object> { @Override public boolean apply(final Object input) { return input == null; } private  NullValuePredicate(); @Override boolean apply(final Object input); @Override String toString(); @Override final int hashCode(); @Override final boolean equals(Object obj); static final NullValuePredicate INSTANCE; }
@Test public void testNullIsAccepted() { assertTrue(NullValuePredicate.INSTANCE.apply(null)); }
@Test public void testNonNullIsRejected() { assertFalse(NullValuePredicate.INSTANCE.apply(new Object())); }