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