Task task1 = new Task("name", "groupName", "sysExecTask", false, true, "command", defaultTimerSchedule);
taskManager.save(task1);
Task task2 = new Task("name", "groupName", "sysExecTask", false, true, "command", defaultTimerSchedule);
taskManager.save(task2);
TaskRun taskRun1 = new TaskRun(Status.SUCCESS, new Date(), new Date(), "out", "err", "stack", task1.getId());
TaskRun taskRun2 = new TaskRun(Status.SUCCESS, new Date(), new Date(), "out", "err", "stack", task1.getId());
TaskRun taskRun3 = new TaskRun(Status.SUCCESS, new Date(), new Date(), "out", "err", "stack", task2.getId());
taskRunManager.save(taskRun1);
taskRunManager.save(taskRun2);
taskRunManager.save(taskRun3);
taskManager.delete(task1);