### Question:
ConditionalNullaryFunction implements NullaryFunction<T> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ConditionalNullaryFunction<?>)) { return false; } ConditionalNullaryFunction<?> that = (ConditionalNullaryFunction<?>) obj; return this.ifPred.equals(that.ifPred) && this.thenFunc.equals(that.thenFunc) && this.elseFunc.equals(that.elseFunc); } ConditionalNullaryFunction(NullaryPredicate ifPred, NullaryFunction<? extends T> thenFunc,
            NullaryFunction<? extends T> elseFunc); T evaluate(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() throws Exception { ConditionalNullaryFunction<Object> f = new ConditionalNullaryFunction<Object>( Constant.TRUE, Constant.of("left"), Constant.of("right")); assertEquals(f,f); assertObjectsAreEqual(f,new ConditionalNullaryFunction<Object>( Constant.TRUE, Constant.of("left"), Constant.of("right"))); assertObjectsAreNotEqual(f,new ConditionalNullaryFunction<Object>( Constant.TRUE, Constant.of(null), Constant.of("right"))); assertObjectsAreNotEqual(f,new ConditionalNullaryFunction<Object>( Constant.TRUE, Constant.of("left"), Constant.of(null))); assertObjectsAreNotEqual(f,new ConditionalNullaryFunction<Object>( Constant.FALSE, Constant.of("left"), Constant.of("right"))); assertTrue(!f.equals(null)); }