Assert.assertEquals(TaskStatus.ERROR, task.getStatus());
}
@Test
public void submitNestedTask1() {
Task parentTask = new Task();
parentTask.setMessage("message");
TaskExecutorFake executor = new TaskExecutorFake();
parentTask.registerOwner(executor);
Task task = new Task();
parentTask.registerStatus(TaskStatus.SUBMITTED);
parentTask.registerStatus(TaskStatus.EXECUTING);
Assert.assertNull(executor.getNestedTasks());
parentTask.submitNestedTask(task);
Assert.assertNotNull(executor.getNestedTasks());
Assert.assertNotNull(task.getParentId());
Assert.assertEquals(parentTask.getId(), task.getParentId());
Assert.assertNotNull(task.getMessage());
Assert.assertEquals("message", task.getMessage());
}