.addNode(new NodeDef("one", null, SynchNodeHandler.class, Arrays.asList(new String[]{"end"})))
.addNode(new NodeDef("two", null, SynchNodeHandler.class, Arrays.asList(new String[]{"end"})))
.addNode(new NodeDef("three", null, SynchNodeHandler.class, Arrays.asList(new String[]{"end"})))
.addNode(new EndNodeDef("end"));
LiteWorkflowInstance job = new LiteWorkflowInstance(def, new XConfiguration(), "abcde");
job.start();
assertEquals(WorkflowInstance.Status.RUNNING, job.getStatus());
job.signal("/", "one");
assertEquals(WorkflowInstance.Status.SUCCEEDED, job.getStatus());
assertEquals(2, enters.size());
assertEquals(2, exits.size());
assertTrue(enters.containsKey("one"));
assertTrue(!enters.containsKey("two"));
assertTrue(!enters.containsKey("three"));
enters.clear();
job = new LiteWorkflowInstance(def, new XConfiguration(), "abcde");
job.start();
assertEquals(WorkflowInstance.Status.RUNNING, job.getStatus());
job.signal("/", "two");
assertEquals(WorkflowInstance.Status.SUCCEEDED, job.getStatus());
assertTrue(!enters.containsKey("one"));
assertTrue(enters.containsKey("two"));
assertTrue(!enters.containsKey("three"));
enters.clear();
job = new LiteWorkflowInstance(def, new XConfiguration(), "abcde");
job.start();
assertEquals(WorkflowInstance.Status.RUNNING, job.getStatus());
job.signal("/", "three");
assertEquals(WorkflowInstance.Status.SUCCEEDED, job.getStatus());
assertTrue(!enters.containsKey("one"));
assertTrue(!enters.containsKey("two"));
assertTrue(enters.containsKey("three"));
enters.clear();
job = new LiteWorkflowInstance(def, new XConfiguration(), "abcde");
job.start();
assertEquals(WorkflowInstance.Status.RUNNING, job.getStatus());
try {
job.signal("/", "bla");