SchedulerAdapter { public XmlBuilder getJobMessages(JobDef jobdef) { XmlBuilder jobMessages = new XmlBuilder("jobMessages"); if (jobdef!=null) { MessageKeeper jobMessageKeeper = jobdef.getMessageKeeper(); if (jobMessageKeeper!=null) { for (int t=0; t<jobMessageKeeper.size(); t++) { XmlBuilder jobMessage=new XmlBuilder("jobMessage"); jobMessage.setValue(jobMessageKeeper.getMessage(t).getMessageText(),true); jobMessage.addAttribute("date", DateUtils.format(jobMessageKeeper.getMessage(t).getMessageDate(), DateUtils.FORMAT_FULL_GENERIC)); jobMessage.addAttribute("level", jobMessageKeeper.getMessage(t).getMessageLevel()); jobMessages.addSubElement(jobMessage); } } } return jobMessages; }  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 testGetJobMessages() throws SchedulerException { assertEquals("<jobMessages />", schedulerAdapter.getJobMessages(null).toXML().trim()); }