Date startTime = ClockUtil.getCurrentTime();
// After process start, the task in the subprocess should be active
runtimeService.startProcessInstanceByKey("timerOnCallActivity");
TaskQuery taskQuery = taskService.createTaskQuery();
Task taskInSubProcess = taskQuery.singleResult();
assertEquals("Task in subprocess", taskInSubProcess.getName());
// When the timer on the subprocess is fired, the complete subprocess is destroyed
ClockUtil.setCurrentTime(new Date(startTime.getTime() + (6 * 60 * 1000))); // + 6 minutes, timer fires on 5 minutes
waitForJobExecutorToProcessAllJobs(10000, 100);