public Long execute() {
Task task = createValidTask();
TaskGroup taskGroup = createValidTaskGroup();
taskGroup.addTaskElement(task);
SpecificResourceAllocation allocation =
SpecificResourceAllocation.create(task);
allocation.setResource(createValidWorker());
LocalDate start = task.getStartAsLocalDate();
task.setIntraDayEndDate(IntraDayDate.startOfDay(start
.plusDays(3)));
allocation.onIntervalWithinTask(start, start.plusDays(3))
.allocateHours(24);
assertTrue(allocation.getAssignedHours() > 0);
task.addResourceAllocation(allocation);
taskElementDAO.save(taskGroup);
return task.getId();