### Question:
TransformedBinaryFunction implements BinaryFunction<L, R, T> { @Override public final boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TransformedBinaryFunction<?, ?, ?>)) { return false; } TransformedBinaryFunction<?, ?, ?> that = (TransformedBinaryFunction<?, ?, ?>) obj; return this.helper.preceding.equals(that.helper.preceding) && this.helper.following.equals(that.helper.following); } <X> TransformedBinaryFunction(BinaryFunction<? super L, ? super R, ? extends X> preceding,
            Function<? super X, ? extends T> following); final T evaluate(L left, R right); @Override final boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() { TransformedBinaryFunction<Integer, Integer, Integer> t = new TransformedBinaryFunction<Integer, Integer, Integer>(new Sum(), new AddOne()); BinaryFunction<Integer, Integer, Integer> f = new BinaryFunction<Integer, Integer, Integer>() { public Integer evaluate(Integer left, Integer right) { return left-right; } }; Function<Integer, Integer> p = new Function<Integer, Integer>() { public Integer evaluate(Integer obj) { return obj-1; } }; assertEquals(t,t); assertObjectsAreEqual(t,new TransformedBinaryFunction<Integer, Integer, Integer>(new Sum(), new AddOne())); assertObjectsAreNotEqual(t,new TransformedBinaryFunction<Integer, Integer, Integer>(f, new AddOne())); assertObjectsAreNotEqual(t,new TransformedBinaryFunction<Integer, Integer, Integer>(new Sum(), p)); assertTrue(!t.equals(null)); }