### Question:
Identity implements Function<T, T>, Predicate<T> { @Override public boolean equals(Object that) { return (that instanceof Identity<?>); } Identity(); T evaluate(T obj); boolean test(Object obj); boolean test(Boolean bool); @Override boolean equals(Object that); @Override int hashCode(); @Override String toString(); static Identity<T> instance(); static final Identity<Object> INSTANCE; }### Answer:
@Test public void testEquals() throws Exception { Function<Object, Object> f = new Identity<Object>(); assertEquals(f,f); assertObjectsAreEqual(f,new Identity<Object>()); assertObjectsAreEqual(f,Identity.instance()); assertObjectsAreNotEqual(f,Constant.of("abcde")); }