NodeEntryImpl node1 = new NodeEntryImpl("test1");
nodes.put("test1", node1);
HashMap<String, INodeEntry> nodes2 = new HashMap<String, INodeEntry>();
NodeEntryImpl node2 = new NodeEntryImpl("test2");
nodes2.put("test2", node2);
test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);
test.beginWorkflowItem(1, testitem);
//sub workflow
test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes2)).build(), null);
test.beginWorkflowItem(1, testitem);
assertEquals(4, testListener1.events.size());
assertWorkflowStateEvent((Object[]) testListener1.events.get(0), ExecutionState.RUNNING, "test1");
assertStepStateEvent((Object[]) testListener1.events.get(1), ExecutionState.RUNNING, null, 1);