// After process start, there should be 3 timers created
ProcessInstance pi = runtimeService.startProcessInstanceByKey("testJoin");
Task task1 = taskService.createTaskQuery().singleResult();
assertEquals("Main Task", task1.getName());
JobQuery jobQuery = managementService.createJobQuery().processInstanceId(pi.getId());
List<Job> jobs = jobQuery.list();
assertEquals(1, jobs.size());
// After setting the clock to time '1 hour and 5 seconds', the first timer should fire
ClockUtil.setCurrentTime(new Date(startTime.getTime() + ((60 * 60 * 1000) + 5000)));
waitForJobExecutorToProcessAllJobs(5000L, 25L);
// timer has fired
assertEquals(0L, jobQuery.count());
// we now have both tasks
assertEquals(2L, taskService.createTaskQuery().count());
// end the first