### Question:
IsNotNull implements Predicate<T> { public boolean test(Object obj) { return (null != obj); } IsNotNull(); boolean test(Object obj); @Override boolean equals(Object that); @Override int hashCode(); @Override String toString(); static IsNotNull<T> instance(); static BinaryPredicate<A, Object> left(); static BinaryPredicate<Object, A> right(); static final IsNotNull<Object> INSTANCE; static final BinaryPredicate<Object, Object> LEFT; static final BinaryPredicate<Object, Object> RIGHT; }### Answer:
@Test public void testTest() throws Exception { Predicate<Object> p = new IsNotNull<Object>(); assertTrue(!p.test(null)); assertTrue(p.test("foo")); assertTrue(p.test(Integer.valueOf(3))); }