assertEquals(2,msf.getAuditTrail().size());
assertEquals(1,msf.countFOE(processInstance)); assertEquals(3,msf.getAuditTrail().size());
	public void testWorkflowWithManualSteps() throws Exception {		MockProcessDef processDef = new MockProcessDef("");				ManualRunTaskDef taskDef = new ManualRunTaskDef(processDef,"");		processDef.setFirstTask(taskDef);		MockStateFactory msf = new MockStateFactory();		IEngine engine = new Engine(msf);		MockProcessInstance processInstance = (MockProcessInstance) engine.createProcess(processDef);		assertEquals(processDef, processInstance.getProcessDef());		assertTrue(processInstance.getProcessInstanceId().longValue() > 0);		assertEquals(IProcessInstance.STATE_CREATED, processInstance.getState());				Set taskInstances = processInstance.getTaskInstances();		assertEquals(0, taskInstances.size());		engine.startProcess(processInstance);				assertEquals(1, processInstance.getTaskInstances().size());		assertEquals(IProcessInstance.STATE_RUNNING, processInstance.getState());				MockTaskInstance ti = processInstance.findTask(taskDef,ITaskInstance.STATE_READY);		assertNotNull(ti);				engine.transitionTask(ti);				assertEquals(IProcessInstance.STATE_COMPLETE, processInstance.getState());		assertEquals(0, processInstance.getTaskInstances().size());		assertEquals(2,msf.getAuditTrail().size());		assertEquals(1,msf.countInstances(processDef));		assertEquals(1,msf.countInstances(taskDef,MockTaskInstance.STATE_DELETED));			}