data[0] = 0;
task.reset();
assertEquals("Task progress is 0 after reset", 0, task.getProgress());
// cancel should stop task at 50%
task.cancel();
Long newTaskId = taskService.scheduleAndStart(task);
assertFalse("Unique id generated", taskId.equals(newTaskId));
assertEquals("Cancelled after 50%", 1, data[0]);
assertTrue("Task was cancelled", task.isCancelled());