### Question:
ScheduleServiceImpl implements ScheduleService { @Override public boolean deleteJob(JobKey jobKey) { log.debug("[schedulerdebug] deleting job with jobKey : {}", jobKey); try { return schedulerFactoryBean.getScheduler().deleteJob(jobKey); } catch (SchedulerException e) { log.error("[schedulerdebug] error occurred while deleting job with jobKey : {}", jobKey, e); } return false; }  @Override boolean addJob(JobRequest jobRequest, Class<? extends Job> jobClass); @Override boolean deleteJob(JobKey jobKey); @Override boolean pauseJob(JobKey jobKey); @Override boolean resumeJob(JobKey jobKey); @Override JobStatusResponse getAllJobs(); @Override boolean isJobRunning(JobKey jobKey); @Override boolean isJobExists(JobKey jobKey); @Override String getJobState(JobKey jobKey);  }### Answer:
@Test public void deleteJob() throws SchedulerException { JobKey jobKey = new JobKey(jobName, groupName); when(schedulerFactoryBean.getScheduler()).thenReturn(scheduler); when(scheduler.deleteJob(jobKey)).thenReturn(true); boolean result = scheduleService.deleteJob(jobKey); assertThat(result).isTrue(); verify(schedulerFactoryBean).getScheduler(); verify(scheduler).deleteJob(jobKey); }