BinaryLogicFilter implements Predicate<ChildVisitor> { @Override public boolean apply(ChildVisitor input) { Preconditions.checkNotNull(input); if (input instanceof AndOperator) { return true; } return false; }  @Override boolean apply(ChildVisitor input);  }
@Test(expected = NullPointerException.class) public void testNull() { BinaryLogicFilter filter = new BinaryLogicFilter(); filter.apply(null); }
@Test public void testOrFalse() { BinaryLogicFilter filter = new BinaryLogicFilter(); assertFalse(filter.apply(new OrOperator())); }
@Test public void testConjunctionPositive() { BinaryLogicFilter filter = new BinaryLogicFilter(); assertTrue(filter.apply(new AndOperator())); }