task1.chain(task2);
task2.chain(task3);
task3.chain(task4);
task4.chain(task5);
ClaimCheck claim = manager.execute(task1);
ClaimCheck indClaim = manager.execute(independentTask);
stopWatch.block(300);
assertEquals("Task 1 is SUCCESS",TaskStatus.SUCCESS,task1.getStatus());
assertEquals("Task 2 is WORKING",TaskStatus.WORKING,task2.getStatus());
assertEquals("Task 3 is DEQUEUED",TaskStatus.DEQUEUED,task3.getStatus());
assertEquals("Task 4 is DEQUEUED",TaskStatus.DEQUEUED,task4.getStatus());
assertEquals("Task 5 is DEQUEUED",TaskStatus.DEQUEUED,task5.getStatus());
stopWatch.block(250);
assertEquals("Task 1 is SUCCESS",TaskStatus.SUCCESS,task1.getStatus());
assertEquals("Task 2 is SUCCESS",TaskStatus.SUCCESS,task2.getStatus());
assertEquals("Task 3 is WORKING",TaskStatus.WORKING,task3.getStatus());
assertEquals("Task 4 is DEQUEUED",TaskStatus.DEQUEUED,task4.getStatus());
assertEquals("Task 5 is DEQUEUED",TaskStatus.DEQUEUED,task5.getStatus());
boolean indSuccess = manager.block(UUID.fromString(indClaim.toString()));
assertFalse("Independent Block was unsuccessful",indSuccess);
boolean success = manager.block(UUID.fromString(claim.toString()));
assertTrue("Block was successful",success);
assertEquals("Task 1 is SUCCESS",TaskStatus.SUCCESS,task1.getStatus());