### Question:
NullaryProcedureNullaryFunction implements NullaryFunction<T> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof NullaryProcedureNullaryFunction<?>)) { return false; } NullaryProcedureNullaryFunction<?> that = (NullaryProcedureNullaryFunction<?>) obj; return this.procedure.equals(that.procedure); } NullaryProcedureNullaryFunction(NullaryProcedure procedure); T evaluate(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static NullaryProcedureNullaryFunction<T> adapt(NullaryProcedure procedure);  }### Answer:
@Test public void testEquals() throws Exception { NullaryFunction<Object> f = new NullaryProcedureNullaryFunction<Object>(NoOp.INSTANCE); assertEquals(f,f); assertObjectsAreEqual(f,new NullaryProcedureNullaryFunction<Object>(NoOp.INSTANCE)); assertObjectsAreNotEqual(f,Constant.of("x")); assertObjectsAreNotEqual(f,new NullaryProcedureNullaryFunction<Object>(new NullaryProcedure() { public void run() { } })); assertObjectsAreNotEqual(f,Constant.of(null)); assertTrue(!f.equals(null)); }