public void testMultipleStartEvents(){
  Date startTime=new Date(1462906201000L);
  processEngineConfiguration.getClock().setCurrentTime(startTime);
  String deploymentId=repositoryService.createDeployment().addClasspathResource("org/activiti/engine/test/bpmn/event/timer/StartTimerEventTest.testMultipleStartEvents.bpmn20.xml").deploy().getId();
  assertEquals(4,managementService.createTimerJobQuery().count());
  assertEquals(0,managementService.createTimerJobQuery().executable().count());
  Date newDate=new Date(startTime.getTime() + (7 * 1000));
  processEngineConfiguration.getClock().setCurrentTime(newDate);
  List<Job> executableTimers=managementService.createTimerJobQuery().executable().list();
  assertEquals(1,executableTimers.size());
  executeJobs(executableTimers);
  validateTaskCounts(0,1,0,0);
  assertEquals(4,managementService.createTimerJobQuery().count());
  assertEquals(0,managementService.createTimerJobQuery().executable().count());
  newDate=new Date(newDate.getTime() + (4 * 1000));
  processEngineConfiguration.getClock().setCurrentTime(newDate);
  executableTimers=managementService.createTimerJobQuery().executable().list();
  assertEquals(2,executableTimers.size());
  executeJobs(executableTimers);
  validateTaskCounts(1,2,0,0);
  assertEquals(4,managementService.createTimerJobQuery().count());
  assertEquals(0,managementService.createTimerJobQuery().executable().count());
  newDate=new Date(newDate.getTime() + (6 * 1000));
  processEngineConfiguration.getClock().setCurrentTime(newDate);
  executableTimers=managementService.createTimerJobQuery().executable().list();
  assertEquals(2,executableTimers.size());
  executeJobs(executableTimers);
  validateTaskCounts(1,3,1,0);
  assertEquals(2,managementService.createTimerJobQuery().count());
  assertEquals(0,managementService.createTimerJobQuery().executable().count());
  newDate=new Date(newDate.getTime() + (6 * 1000));
  processEngineConfiguration.getClock().setCurrentTime(newDate);
  executableTimers=managementService.createTimerJobQuery().executable().list();
  assertEquals(2,executableTimers.size());
  executeJobs(executableTimers);
  validateTaskCounts(2,3,1,1);
  assertEquals(1,managementService.createTimerJobQuery().count());
  assertEquals(0,managementService.createTimerJobQuery().executable().count());
  repositoryService.deleteDeployment(deploymentId,true);
}
