### Question:
ModuloFilter implements Predicate<Object> { @Override public boolean test(Object item) { return ++count % mod == remainder; } ModuloFilter(int mod, int remainder);  ModuloFilter(boolean oddOrEven); @Override boolean test(Object item);  }### Answer:
@Test public void testSplitFilter() { ModuloFilter filter = new ModuloFilter(true); assertTrue(filter.test(new Object())); assertFalse(filter.test(new Object())); assertTrue(filter.test(new Object())); filter = new ModuloFilter(false); assertFalse(filter.test(new Object())); assertTrue(filter.test(new Object())); assertFalse(filter.test(new Object())); }