### Question:
CronJob extends QuartzJobBean implements InterruptableJob { @Override protected void executeInternal(JobExecutionContext context) throws JobExecutionException { JobDataMap jobDataMap = context.getJobDetail().getJobDataMap(); if (jobDataMap.size() > 0 && !isJobInterrupted) { int jobId = jobDataMap.getInt("jobId"); JobKey jobKey = context.getJobDetail().getKey(); currThread = Thread.currentThread(); log.info("============================================================================"); log.info("CronJob started :: sleep : {} jobId : {} jobKey : {} - {}", MAX_SLEEP_IN_SECONDS, jobId, jobKey, currThread.getName()); IntStream.range(0, 3).forEach(i -> { log.info("CronJob Counting - {}", i); try { TimeUnit.SECONDS.sleep(MAX_SLEEP_IN_SECONDS); } catch (InterruptedException e) { log.error(e.getMessage(), e); } }); log.info("CronJob ended :: jobKey : {} - {}", jobKey, currThread.getName()); log.info("============================================================================"); } }  @Override void interrupt();  }### Answer:
@Test public void executeInternal() throws JobExecutionException { ReflectionTestUtils.setField(cronJob, "MAX_SLEEP_IN_SECONDS", MAX_SLEEP_IN_SECONDS); JobDataMap jobDataMap = new JobDataMap(); jobDataMap.put("jobId", 1231231); cronJob.executeInternal(TestUtils.createJobExecutionContext(scheduler, newJob(CronJob.class) .usingJobData(jobDataMap) .withIdentity(TEST_NAME, TEST_GROUP) .build(), CronJob.class)); }