@Test
public void testSuccessRequireAll() {
Interpreter interpreter = new Interpreter(null);
ParallelNode parallel = new ParallelNode(ParallelNode.Policy.RequireAll, ParallelNode.Policy.RequireOne);
Node one = create(new Mocker() {
@Override
public void mock(Task spy) {
when(spy.update(anyInt())).thenReturn(Status.RUNNING, Status.SUCCESS);
}
});
Node two = create(new Mocker() {
@Override
public void mock(Task spy) {
when(spy.update(anyInt())).thenReturn(Status.RUNNING, Status.RUNNING, Status.SUCCESS);
}
});