### Question:
DefaultSchedulerService implements InitializingBean, SchedulerService { public Boolean exists(String triggerName) { Boolean found = false; try { Trigger trigger = m_scheduler.getTrigger(triggerName, m_triggerGroup); if (trigger != null) { found = true; } } catch (SchedulerException e) { log().error("exception looking up trigger name: " + triggerName); log().error(e.getMessage()); } return found; }  @Override void afterPropertiesSet(); List<TriggerDescription> getTriggerDescriptions(); Boolean exists(String triggerName); void removeTrigger(String triggerName); void removeTriggers(String[] triggerNames); String addCronTrigger(String id, ReportParameters criteria,
            DeliveryOptions deliveryOptions,
            String cronExpression, RequestContext context); String execute(String id, ReportParameters criteria,
            DeliveryOptions deliveryOptions, RequestContext context); void setScheduler(Scheduler scheduler); void setJobDetail(JobDetail reportJob); void setTriggerGroup(String triggerGroup); void setReportWrapperService(ReportWrapperService reportWrapperService);  }### Answer:
@Test public void testExists() { expect(m_reportWrapperService.validate(m_criteria, REPORT_ID)).andReturn(true); replay(m_reportWrapperService); MockRequestContext context = new MockRequestContext(); DeliveryOptions deliveryOptions = new DeliveryOptions(); deliveryOptions.setInstanceId("testExistsTrigger"); assertEquals("success", m_schedulerService.addCronTrigger(REPORT_ID, m_criteria, deliveryOptions, CRON_EXPRESSION, context)); verify(m_reportWrapperService); assertTrue(m_schedulerService.exists("testExistsTrigger")); assertFalse(m_schedulerService.exists("bogusTrigger")); m_schedulerService.removeTrigger("testExistsTrigger"); }