public void testWorkflowStates() throws WorkflowException {
LiteWorkflowApp def = new LiteWorkflowApp("wf", "<worklfow-app/>", new StartNodeDef("one"))
.addNode(new NodeDef("one", null, AsynchNodeHandler.class, Arrays.asList(new String[]{"end"})))
.addNode(new EndNodeDef("end"));
LiteWorkflowInstance job = new LiteWorkflowInstance(def, new XConfiguration(), "1");
assertEquals(WorkflowInstance.Status.PREP, job.getStatus());
job.kill();
assertEquals(WorkflowInstance.Status.KILLED, job.getStatus());
job = new LiteWorkflowInstance(def, new XConfiguration(), "1");
job.fail("one");
assertEquals(WorkflowInstance.Status.FAILED, job.getStatus());
job = new LiteWorkflowInstance(def, new XConfiguration(), "1");
try {
job.suspend();
fail();
}