### Question:
RunScheduler { public void unscheduleRunSchedule(final RunSchedule schedule) { try { log.debug("Request received to unscheduling trigger for: " + schedule.getType() + ID + schedule.getSchedulableId()); final JobKey key = jobDetail(schedule).getKey(); quartzScheduler.deleteJob(key); log.debug("Schedule " + schedule.getCronExpression() + " for " + schedule.getType() + ID + schedule.getSchedulableId() + " was revoked successfully."); } catch (SchedulerException e) { log.error("SchedulerException while unscheduling trigger for " + schedule.getType() + ID + schedule.getSchedulableId() + " : " + e.getMessage()); } } @Autowired  RunScheduler(final SchedulerFactoryBean schedulerFactoryBean); @PostConstruct void init(); void scheduleRunSchedule(final RunSchedule schedule); void unscheduleRunSchedule(final RunSchedule schedule);  }### Answer:
@Test public void testUnscheduleRunSchedule() throws InterruptedException { final RunSchedule runSchedule = getRunSchedule(RUN_ID, RUN_ID, ScheduleType.PIPELINE_RUN, RunScheduledAction.PAUSE, CRON_EXPRESSION); runScheduler.scheduleRunSchedule(runSchedule); TimeUnit.SECONDS.sleep(1); runScheduler.unscheduleRunSchedule(runSchedule); TimeUnit.SECONDS.sleep(TEST_PERIOD_DURATION); Mockito.verify(pipelineRunManager, Mockito.times(1)).pauseRun(RUN_ID, true); }