### Question:
IsNotEqual implements BinaryPredicate<L, R> { public boolean test(L left, R right) { return (null == left ? null != right : !left.equals(right)); } IsNotEqual(); boolean test(L left, R right); @Override boolean equals(Object that); @Override int hashCode(); @Override String toString(); static IsNotEqual<L, R> instance(); static Predicate<L> to(R object); static final IsNotEqual<Object, Object> INSTANCE; }### Answer:
@Test public void testTest() throws Exception { IsNotEqual<Object, Object> p = new IsNotEqual<Object, Object>(); assertTrue("For symmetry, two nulls should be equal", !p.test(null, null)); assertTrue(!p.test("foo", "foo")); assertTrue(p.test(null, "foo")); assertTrue(p.test("foo", null)); assertTrue(!p.test(Integer.valueOf(3), Integer.valueOf(3))); assertTrue(p.test(null, Integer.valueOf(3))); assertTrue(p.test(Integer.valueOf(3), null)); assertTrue(p.test(Integer.valueOf(3), Integer.valueOf(4))); assertTrue(p.test(Integer.valueOf(4), Integer.valueOf(3))); assertTrue(p.test("3", Integer.valueOf(3))); assertTrue(p.test(Integer.valueOf(3), "3")); }