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