### Question:
Or extends BasePredicateList<A> { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Or<?>)) { return false; } Or<?> that = (Or<?>) obj; return getPredicateListEquals(that); } Or();  Or(Iterable<Predicate<? super A>> predicates);  Or(Predicate<? super A>... predicates); Or<A> or(Predicate<? super A> p); boolean test(A a); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() throws Exception { Or<Object> p = new Or<Object>(); assertEquals(p,p); Or<Object> q = new Or<Object>(); assertObjectsAreEqual(p,q); And<Object> r = new And<Object>(); assertObjectsAreNotEqual(p,r); for (int i=0;i<3;i++) { p.or(Constant.truePredicate()); assertObjectsAreNotEqual(p,q); q.or(Constant.truePredicate()); assertObjectsAreEqual(p,q); r.and(Constant.truePredicate()); assertObjectsAreNotEqual(p,r); p.or(new Or<Object>(Constant.truePredicate(),Constant.falsePredicate())); assertObjectsAreNotEqual(p,q); q.or(new Or<Object>(Constant.truePredicate(),Constant.falsePredicate())); assertObjectsAreEqual(p,q); r.and(new Or<Object>(Constant.truePredicate(),Constant.falsePredicate())); assertObjectsAreNotEqual(p,r); } assertObjectsAreNotEqual(p,Constant.truePredicate()); Or<Object> s = new Or<Object>(); s.or(Constant.truePredicate()); s.or(new Or<Object>(Constant.truePredicate(),Constant.falsePredicate())); assertObjectsAreEqual(s, new Or<Object>(s.getPredicateList())); }