Flow flow1 = mock(Flow.class);
Flow flow2 = mock(Flow.class);
SplitState state = new SplitState(Arrays.asList(flow1, flow2), "foo");
state.setTaskExecutor(new SimpleAsyncTaskExecutor());
when(flow1.start(executor)).thenReturn(new FlowExecution("step1", FlowExecutionStatus.COMPLETED));
when(flow2.start(executor)).thenReturn(new FlowExecution("step1", FlowExecutionStatus.COMPLETED));
FlowExecutionStatus result = state.handle(executor);
assertEquals(FlowExecutionStatus.COMPLETED, result);