### Question:
Not implements Predicate<A> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Not<?>)) { return false; } Not<?> that = (Not<?>) obj; return this.predicate.equals(that.predicate); } Not(Predicate<? super A> predicate); boolean test(A obj); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static Predicate<A> not(Predicate<? super A> pred);  }### Answer:
@Test public void testEquals() throws Exception { Not<Object> p = new Not<Object>(Constant.TRUE); assertEquals(p, p); assertObjectsAreEqual(p, new Not<Object>(Constant.TRUE)); assertObjectsAreEqual(p, Not.not(Constant.TRUE)); assertObjectsAreNotEqual(p, new Not<Object>(Constant.FALSE)); assertObjectsAreNotEqual(p, Constant.TRUE); assertTrue(!p.equals(null)); }