### Question:
BinaryOr extends BaseBinaryPredicateList<L, R> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BinaryOr<?, ?>)) { return false; } BinaryOr<?, ?> that = (BinaryOr<?, ?>) obj; return getBinaryPredicateListEquals(that); } BinaryOr();  BinaryOr(BinaryPredicate<? super L, ? super R>... predicates);  BinaryOr(Iterable<BinaryPredicate<? super L, ? super R>> predicates); BinaryOr<L, R> or(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 { BinaryOr<Object, Object> p = new BinaryOr<Object, Object>(); assertEquals(p, p); BinaryOr<Object, Object> q = new BinaryOr<Object, Object>(); assertObjectsAreEqual(p, q); BinaryAnd<Object, Object> r = new BinaryAnd<Object, Object>(); assertObjectsAreNotEqual(p, r); for (int i = 0; i < 3; i++) { p.or(Constant.TRUE); assertObjectsAreNotEqual(p, q); q.or(Constant.TRUE); assertObjectsAreEqual(p, q); r.and(Constant.TRUE); assertObjectsAreNotEqual(p, r); p.or(new BinaryOr<Object, Object>(Constant.truePredicate(), Constant.FALSE)); assertObjectsAreNotEqual(p, q); q.or(new BinaryOr<Object, Object>(Constant.truePredicate(), Constant.FALSE)); assertObjectsAreEqual(p, q); r.and(new BinaryOr<Object, Object>(Constant.truePredicate(), Constant.FALSE)); assertObjectsAreNotEqual(p, r); } assertObjectsAreNotEqual(p, Constant.TRUE); Iterable<BinaryPredicate<Object, Object>> iterable = Arrays.<BinaryPredicate<Object, Object>> asList((BinaryPredicate<Object, Object>) Constant.truePredicate()); assertObjectsAreNotEqual(p, new BinaryOr(iterable)); assertObjectsAreNotEqual(p, new BinaryOr((Iterable<BinaryPredicate<Object, Object>>) null)); assertObjectsAreNotEqual(p, new BinaryOr((BinaryPredicate<Object, Object>[]) null)); assertObjectsAreNotEqual(p, new BinaryOr((BinaryPredicate<Object, Object>) null)); assertTrue(!p.equals(null)); }