SchedulerAdapter { public XmlBuilder getSchedulerCalendarNamesToXml(Scheduler theScheduler) { XmlBuilder xbRoot = new XmlBuilder("schedulerCalendars"); try { List<String> names = theScheduler.getCalendarNames(); for (int i = 0; i < names.size(); i++) { XmlBuilder el = new XmlBuilder("calendar"); el.setValue(names.get(i)); xbRoot.addSubElement(el); } } catch (SchedulerException se) { log.error(se.toString()); } return xbRoot; }  XmlBuilder getJobGroupNamesWithJobsToXml(Scheduler theScheduler, IbisManager ibisManager); XmlBuilder getJobTriggers(List<? extends Trigger> triggers); XmlBuilder getJobMessages(JobDef jobdef); XmlBuilder getJobRunStatistics(JobDef jobdef); XmlBuilder getSchedulerCalendarNamesToXml(Scheduler theScheduler); XmlBuilder getSchedulerMetaDataToXml(Scheduler theScheduler); XmlBuilder jobDataMapToXmlBuilder(JobDataMap jd); XmlBuilder jobDetailToXmlBuilder(JobDetail jobDetail); XmlBuilder triggerToXmlBuilder(Trigger trigger);  }
@Test public void testGetSchedulerCalendarNamesToXml() throws SchedulerException { schedulerHelper.getScheduler().addCalendar("DummyCalendar A", new HolidayCalendar(), false, false); schedulerHelper.getScheduler().addCalendar("DummyCalendar B", new HolidayCalendar(), false, false); String result = schedulerAdapter.getSchedulerCalendarNamesToXml(schedulerHelper.getScheduler()).toXML(); assertTrue(result.contains("DummyCalendar A") && result.contains("DummyCalendar B")); }