### Question:
IsSame implements BinaryPredicate<L, R> { @Override public boolean equals(Object that) { return that instanceof IsSame<?, ?>; } IsSame(); boolean test(L left, R right); @Override boolean equals(Object that); @Override int hashCode(); @Override String toString(); static IsSame<L, R> instance(); static Predicate<L> as(R object); static final IsSame<Object, Object> INSTANCE; }### Answer:
@Test public void testEquals() throws Exception { BinaryPredicate<Object, Object> f = new IsSame<Object, Object>(); assertEquals(f, f); assertObjectsAreEqual(f, new IsSame<Object, Object>()); assertObjectsAreEqual(f, IsSame.instance()); assertObjectsAreNotEqual(f, Constant.truePredicate()); }