verifyNoMoreInteractions(second);
}
@Test
public void testStopFail() throws IOException {
And and = new And();
PathData pathData = mock(PathData.class);
Expression first = mock(Expression.class);
when(first.apply(pathData)).thenReturn(Result.STOP);
Expression second = mock(Expression.class);
when(second.apply(pathData)).thenReturn(Result.FAIL);
Deque<Expression> children = new LinkedList<Expression>();
children.add(second);
children.add(first);
and.addChildren(children);
assertEquals(Result.STOP.combine(Result.FAIL), and.apply(pathData));
verify(first).apply(pathData);
verify(second).apply(pathData);
verifyNoMoreInteractions(first);
verifyNoMoreInteractions(second);
}