@Test
public void testDeleteAllJobs() throws Exception {

  RequestExecution requestExecution = createRequestExecution(true);
  Assert.assertNotNull(requestExecution);
  executionScheduleManager.scheduleBatch(requestExecution);
  String jobName1 = executionScheduleManager.getJobName(requestExecution
    .getId(), 10L);
  String jobName2 = executionScheduleManager.getJobName(requestExecution
    .getId(), 12L);
  JobDetail jobDetail1 = scheduler.getJobDetail(JobKey.jobKey(jobName1,
    ExecutionJob.LINEAR_EXECUTION_JOB_GROUP));
  JobDetail jobDetail2 = scheduler.getJobDetail(JobKey.jobKey(jobName2,
    ExecutionJob.LINEAR_EXECUTION_JOB_GROUP));
  Assert.assertNotNull(jobDetail1);
  Assert.assertNotNull(jobDetail2);
  Assert.assertTrue(!scheduler.getTriggersOfJob(JobKey.jobKey(jobName1,
    ExecutionJob.LINEAR_EXECUTION_JOB_GROUP)).isEmpty());
  executionScheduleManager.deleteAllJobs(requestExecution);
  Assert.assertTrue(scheduler.getTriggersOfJob(JobKey.jobKey(jobName1,
    ExecutionJob.LINEAR_EXECUTION_JOB_GROUP)).isEmpty());
}