### Question:
BinaryAnd extends BaseBinaryPredicateList<L, R> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BinaryAnd<?, ?>)) { return false; } BinaryAnd<?, ?> that = (BinaryAnd<?, ?>) obj; return getBinaryPredicateListEquals(that); } BinaryAnd();  BinaryAnd(BinaryPredicate<? super L, ? super R>... predicates);  BinaryAnd(Iterable<BinaryPredicate<? super L, ? super R>> predicates); BinaryAnd<L, R> and(BinaryPredicate<? super L, ? super R> p); boolean test(L a, R b); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@SuppressWarnings("rawtypes") @Test public void testEquals() throws Exception { BinaryAnd<Object, Object> p = new BinaryAnd<Object, Object>(); assertEquals(p,p); BinaryAnd<Object, Object> q = new BinaryAnd<Object, Object>(); assertObjectsAreEqual(p,q); BinaryOr<Object, Object> r = new BinaryOr<Object, Object>(); assertObjectsAreNotEqual(p,r); for (int i=0;i<3;i++) { p.and(Constant.truePredicate()); assertObjectsAreNotEqual(p,q); q.and(Constant.truePredicate()); assertObjectsAreEqual(p,q); p.and(new BinaryAnd<Object, Object>(Constant.truePredicate(),Constant.falsePredicate())); assertObjectsAreNotEqual(p,q); q.and(new BinaryAnd<Object, Object>(Constant.truePredicate(),Constant.falsePredicate())); assertObjectsAreEqual(p,q); } assertObjectsAreNotEqual(p,Constant.truePredicate()); Iterable<BinaryPredicate<Object, Object>> iterable = Arrays.<BinaryPredicate<Object, Object>>asList( (BinaryPredicate<Object, Object>)Constant.truePredicate()); assertObjectsAreNotEqual(p,new BinaryAnd(iterable)); assertObjectsAreNotEqual(p,new BinaryAnd((Iterable<BinaryPredicate<Object, Object>>)null)); assertObjectsAreNotEqual(p,new BinaryAnd((BinaryPredicate<Object, Object>[])null)); assertObjectsAreNotEqual(p,new BinaryAnd((BinaryPredicate<Object, Object>)null)); assertTrue(!p.equals(null)); }