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