MultiProducerWorkflow extends StandardWorkflow { public void addStandaloneProducer(StandaloneProducer producer) { standaloneProducers.add(Args.notNull(producer, "producer")); } MultiProducerWorkflow(); @Override synchronized void onAdaptrisMessage(AdaptrisMessage msg, Consumer<AdaptrisMessage> success, Consumer<AdaptrisMessage> failure); void addStandaloneProducer(StandaloneProducer producer); List<StandaloneProducer> getStandaloneProducers(); void setStandaloneProducers(List<StandaloneProducer> l); void setUseProcessedMessage(Boolean useProc); Boolean getUseProcessedMessage();  }
@Test public void testAddStandaloneProducer() { MultiProducerWorkflow wf = new MultiProducerWorkflow(); wf.addStandaloneProducer(new StandaloneProducer()); assertEquals(1, wf.getStandaloneProducers().size()); try { wf.addStandaloneProducer(null); fail(); } catch (IllegalArgumentException e) { } assertEquals(1, wf.getStandaloneProducers().size()); }