// Set the clock fixed
Date startTime = new Date();
// After process start, there should be 3 timers created
ProcessInstance pi = runtimeService.startProcessInstanceByKey("multipleTimersOnUserTask");
JobQuery jobQuery = managementService.createJobQuery().processInstanceId(pi.getId());
List<Job> jobs = jobQuery.list();
assertEquals(3, jobs.size());
// After setting the clock to time '1 hour and 5 seconds', the second timer should fire
ClockUtil.setCurrentTime(new Date(startTime.getTime() + ((60 * 60 * 1000) + 5000)));
waitForJobExecutorToProcessAllJobs(5000L);
assertEquals(0L, jobQuery.count());
// which means that the third task is reached
Task task = taskService.createTaskQuery().singleResult();
assertEquals("Third Task", task.getName());
}