### Question:
Offset implements NullaryPredicate, Predicate<Object>,
        BinaryPredicate<Object, Object> { public boolean test() { if (state.get() < min) { state.incrementAndGet(); return false; } return true; } Offset(int count); boolean test(); boolean test(Object obj); boolean test(Object a, Object b); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testZero() throws Exception { NullaryPredicate p = new Offset(0); assertTrue( p.test()); assertTrue( p.test()); assertTrue( p.test()); }
@Test public void testTestNullary() throws Exception { NullaryPredicate p = new Offset(3); assertTrue(!p.test()); assertTrue(!p.test()); assertTrue(!p.test()); assertTrue(p.test()); }
@Test public void testTestUnary() throws Exception { Predicate<Object> p = new Offset(3); assertTrue(!p.test(null)); assertTrue(!p.test(null)); assertTrue(!p.test(null)); assertTrue(p.test(null)); }
@Test public void testTestBinary() throws Exception { BinaryPredicate<Object, Object> p = new Offset(3); assertTrue(!p.test(null,null)); assertTrue(!p.test(null,null)); assertTrue(!p.test(null,null)); assertTrue(p.test(null,null)); }