Filter implements Externalizable { public abstract boolean filter(Object o);  abstract boolean filter(Object o); void readExternal(ObjectInput arg0); void writeExternal(ObjectOutput arg0); static ClassSerializer getSerializer(); static void writeFilter(ObjectOutput out, Filter f); static Filter readFilter(ObjectInput in); Boolean requiresDataObjectContext();  }
@Test public void testEquals() { PojoPropertyPath v = new PojoPropertyPath("FirstName"); EQFilter ef = new EQFilter(v, "Billy"); Assert.assertTrue(ef.filter(c)); NotFilter nf = new NotFilter(ef); Assert.assertFalse(nf.filter(c)); NEQFilter nef = new NEQFilter(v, "Bobby"); Assert.assertTrue(nef.filter(c)); }
@Test public void testQB() { ValuePath fn = new PojoPropertyPath("FirstName"); ValuePath sn = new PojoFieldPath("surname"); Filter f = FilterBuilder.and(FilterBuilder.eq(fn, "Billy"), FilterBuilder.eq(sn, "Newport")); Assert.assertEquals(f.filter(c), true); }