public class TestNot extends TestExpression {
@Test
public void applyPass() throws IOException {
Not not = new Not();
PathData pathData = mock(PathData.class);
Expression child = mock(Expression.class);
when(child.apply(pathData)).thenReturn(Result.PASS);
Deque<Expression> children = new LinkedList<Expression>();
children.add(child);
not.addChildren(children);
assertEquals(Result.FAIL, not.apply(pathData));
verify(child).apply(pathData);
verifyNoMoreInteractions(child);
}