### Question:
CompositeProcedure implements Procedure<A> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CompositeProcedure<?>)) { return false; } CompositeProcedure<?> that = (CompositeProcedure<?>) obj; return this.function.equals(that.function); } CompositeProcedure(Procedure<? super A> procedure); private  CompositeProcedure(CompositeFunction<? super A, Object> function); CompositeProcedure<T> of(Function<? super T, ? extends A> preceding); void run(A obj); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() throws Exception { CompositeProcedure<Object> f = Composite.procedure(NoOp.instance()); assertEquals(f,f); CompositeProcedure<Object> g = Composite.procedure(NoOp.instance()); assertObjectsAreEqual(f,g); for (int i=0;i<3;i++) { f = f.of(Constant.of("x")); assertObjectsAreNotEqual(f,g); g = g.of(Constant.of("x")); assertObjectsAreEqual(f,g); f = f.of(Constant.of("y")).of(Constant.of("z")); assertObjectsAreNotEqual(f,g); g = g.of(Constant.of("y")).of(Constant.of("z")); assertObjectsAreEqual(f,g); } assertObjectsAreNotEqual(f,Constant.FALSE); assertTrue(!f.equals(null)); }