tms.complete(task6ID);
PATask task7 = (PATask) tms.getTask(task6ID);
Assert.assertEquals(TaskState.COMPLETED, task7.getState());
tms.fail(task7.getID(), "code", "reason");
PATask task8 = (PATask) tms.getTask(task7.getID());
Assert.assertEquals(task8.getProcessID(), task7.getProcessID());
Assert.assertEquals(TaskState.FAILED, task8.getState());
Assert.assertEquals("code", task8.getFailureCode());