StandaloneProducer extends ServiceImp implements AdaptrisMessageSender, ConnectedService { @Override public String createQualifier() { String qualifier = getProducer().createQualifier(); return isEmpty(qualifier) ? super.createQualifier() : qualifier; } 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();  }
@Test public void testCreateQualifier() throws Exception { FsProducer mp = new FsProducer(); mp.setUniqueId("abc"); StandaloneProducer service = new StandaloneProducer(mp); assertEquals("abc", service.createQualifier()); assertEquals(service.getProducer().createQualifier(), service.createQualifier()); mp.setUniqueId(""); service.setUniqueId(StandaloneProducer.class.getSimpleName()); assertEquals(StandaloneProducer.class.getSimpleName(), service.createQualifier()); assertNotSame(service.getProducer().createQualifier(), service.createQualifier()); }