### Question:
CompositeBinaryFunction implements BinaryFunction<L, R, T> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CompositeBinaryFunction<?, ?, ?>)) { return false; } CompositeBinaryFunction<?, ?, ?> that = (CompositeBinaryFunction<?, ?, ?>) obj; return this.helper.f.equals(that.helper.f) && this.helper.g.equals(that.helper.g) && this.helper.h.equals(that.helper.h); } <G, H> CompositeBinaryFunction(BinaryFunction<? super G, ? super H, ? extends T> f,
            Function<? super L, ? extends G> g, Function<? super R, ? extends H> h); T evaluate(L left, R right); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() throws Exception { BinaryFunction<Object, Object, Object> f = new CompositeBinaryFunction<Object, Object, Object>( LeftIdentity.FUNCTION, Constant.of("left"), Constant.of("right")); assertEquals(f,f); assertObjectsAreEqual(f,new CompositeBinaryFunction<Object, Object, Object>( LeftIdentity.FUNCTION, Constant.of("left"), Constant.of("right"))); assertObjectsAreNotEqual(f,new CompositeBinaryFunction<Object, Object, Object>( RightIdentity.FUNCTION, Constant.of("left"), Constant.of("right"))); assertObjectsAreNotEqual(f,new CompositeBinaryFunction<Object, Object, Object>( LeftIdentity.FUNCTION, Identity.instance(), Constant.of("right"))); assertObjectsAreNotEqual(f,new CompositeBinaryFunction<Object, Object, Object>( LeftIdentity.FUNCTION, Constant.of("left"), Identity.instance())); assertTrue(!((CompositeBinaryFunction<?,?,?>)f).equals(null)); }