SchedulerSender extends SenderWithParametersBase { @Override public void configure() throws ConfigurationException { if (StringUtils.isEmpty(javaListener)) { throw new ConfigurationException("Property [serviceName] is empty"); } if (StringUtils.isEmpty(cronExpressionPattern)) { throw new ConfigurationException("Property [cronExpressionPattern] is empty"); } Parameter p = new Parameter(); p.setName("_cronexpression"); p.setPattern(cronExpressionPattern); addParameter(p); if (StringUtils.isNotEmpty(jobNamePattern)) { p = new Parameter(); p.setName("_jobname"); p.setPattern(jobNamePattern); addParameter(p); } super.configure(); }  @Override void configure(); @Override void open(); @Override boolean isSynchronous(); @Override Message sendMessage(Message message, IPipeLineSession session); @IbisDoc({"expression that generates the cron trigger", ""}) void setCronExpressionPattern(String string); @IbisDoc({"job group in which the new trigger is to be created (optional)", ""}) void setJobGroup(String string); @IbisDoc({"pattern that leads to the name of the registered trigger(optional)", ""}) void setJobNamePattern(String string); @IbisDoc({"java listener to be called when scheduler trigger fires", ""}) void setJavaListener(String string); SchedulerHelper getSchedulerHelper(); void setSchedulerHelper(SchedulerHelper helper);  }
@Test public void testConfigure() throws ConfigurationException, SenderException, SchedulerException, IOException { schedulerSender.setJavaListener("dummyJavaListener"); schedulerSender.setCronExpressionPattern("0 0 5 * * ?"); schedulerSender.configure(); schedulerSender.sendMessage(new Message("message"), null); assertNull(schedulerSender.getParameterList().findParameter("_jobname")); assertTrue(schedulerHelper.contains(JOB_NAME)); }