// Set the clock fixed
Date startTime = new Date();
// After process start, there should be timer created
JobQuery jobQuery = managementService.createJobQuery();
assertEquals(1, jobQuery.count());
// After setting the clock to time '50minutes and 5 seconds', the second
// timer should fire
ClockUtil.setCurrentTime(new Date(startTime.getTime() + ((50 * 60 * 1000) + 5000)));
executeAllJobs();
executeAllJobs();
List<ProcessInstance> pi = runtimeService.createProcessInstanceQuery().processDefinitionKey("startTimerEventExample").list();
assertEquals(1, pi.size());
assertEquals(0, jobQuery.count());
}