@Test public void testDoService() throws Exception { MockMessageProducer m = new MockMessageProducer(); StandaloneProducer service = new StandaloneProducer(m); service.setProducer(m); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage("XYZ"); execute(service, msg); assertEquals(1, m.getMessages().size()); }
@Override public void doService(AdaptrisMessage msg) throws ServiceException { try { this.produce(msg); } catch (CoreException e) { throw new ServiceException(e); } }
StandaloneProducer extends ServiceImp implements AdaptrisMessageSender, ConnectedService { @Override public void doService(AdaptrisMessage msg) throws ServiceException { try { this.produce(msg); } catch (CoreException e) { throw new ServiceException(e); } } }
StandaloneProducer extends ServiceImp implements AdaptrisMessageSender, ConnectedService { @Override public void doService(AdaptrisMessage msg) throws ServiceException { try { this.produce(msg); } catch (CoreException e) { throw new ServiceException(e); } } StandaloneProducer();  StandaloneProducer(AdaptrisMessageProducer p);  StandaloneProducer(AdaptrisConnection c, AdaptrisMessageProducer p); }
StandaloneProducer extends ServiceImp implements AdaptrisMessageSender, ConnectedService { @Override public void doService(AdaptrisMessage msg) throws ServiceException { try { this.produce(msg); } catch (CoreException e) { throw new ServiceException(e); } } StandaloneProducer();  StandaloneProducer(AdaptrisMessageProducer p);  StandaloneProducer(AdaptrisConnection c, AdaptrisMessageProducer p); @Override void produce(AdaptrisMessage msg); @Override @SuppressWarnings("deprecation") void produce(AdaptrisMessage msg, ProduceDestination dest); @Override void start(); @Override void stop(); @Override void prepare(); @Override AdaptrisConnection getConnection(); AdaptrisMessageProducer getProducer(); @Override void setConnection(AdaptrisConnection conn); void setProducer(AdaptrisMessageProducer prod); @Override void doService(AdaptrisMessage msg); @Override String createName(); @Override String createQualifier(); }
StandaloneProducer extends ServiceImp implements AdaptrisMessageSender, ConnectedService { @Override public void doService(AdaptrisMessage msg) throws ServiceException { try { this.produce(msg); } catch (CoreException e) { throw new ServiceException(e); } } StandaloneProducer();  StandaloneProducer(AdaptrisMessageProducer p);  StandaloneProducer(AdaptrisConnection c, AdaptrisMessageProducer p); @Override void produce(AdaptrisMessage msg); @Override @SuppressWarnings("deprecation") void produce(AdaptrisMessage msg, ProduceDestination dest); @Override void start(); @Override void stop(); @Override void prepare(); @Override AdaptrisConnection getConnection(); AdaptrisMessageProducer getProducer(); @Override void setConnection(AdaptrisConnection conn); void setProducer(AdaptrisMessageProducer prod); @Override void doService(AdaptrisMessage msg); @Override String createName(); @Override String createQualifier();  }