### Question:
ConditionalNullaryPredicate implements NullaryPredicate { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ConditionalNullaryPredicate)) { return false; } ConditionalNullaryPredicate that = (ConditionalNullaryPredicate) obj; return this.ifPred.equals(that.ifPred) && this.thenPred.equals(that.thenPred) && this.elsePred.equals(that.elsePred); } ConditionalNullaryPredicate(NullaryPredicate ifPred, NullaryPredicate thenPred, NullaryPredicate elsePred); boolean test(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() throws Exception { ConditionalNullaryPredicate p = new ConditionalNullaryPredicate( Constant.TRUE, Constant.TRUE, Constant.FALSE); assertEquals(p,p); assertObjectsAreEqual(p,new ConditionalNullaryPredicate( Constant.TRUE, Constant.TRUE, Constant.FALSE)); assertObjectsAreNotEqual(p,new ConditionalNullaryPredicate( Constant.TRUE, Constant.FALSE, Constant.TRUE)); assertObjectsAreNotEqual(p,new ConditionalNullaryPredicate( Constant.TRUE, Constant.TRUE, Constant.TRUE)); assertObjectsAreNotEqual(p,new ConditionalNullaryPredicate( Constant.FALSE, Constant.TRUE, Constant.FALSE)); assertTrue(!p.equals(null)); }