@Test
public void registeringException() {
Task task = new Task();
task.registerStatus(TaskStatus.SUBMITTED);
task.registerStatus(TaskStatus.EXECUTING);
Exception exception = new Exception();
task.registerException(exception);
Assert.assertNotNull(task.getException());
Assert.assertEquals(exception, task.getException());
Assert.assertEquals(TaskStatus.ERROR, task.getStatus());