RelaxedFtpProducer extends ProduceOnlyProducerImp { FileNameCreator filenameCreator() { return ObjectUtils.defaultIfNull(getFilenameCreator(), new FormattedFilenameCreator()); } RelaxedFtpProducer(); @Override void doProduce(AdaptrisMessage msg, String endpoint); @Override void prepare(); @Override String endpoint(AdaptrisMessage msg);  }
@Test public void testSetFilenameCreator() throws Exception { RelaxedFtpProducer ftpProducer = new RelaxedFtpProducer(); assertEquals(FormattedFilenameCreator.class, ftpProducer.filenameCreator().getClass()); ftpProducer.setFilenameCreator(new MetadataFileNameCreator()); assertEquals(MetadataFileNameCreator.class, ftpProducer.getFilenameCreator().getClass()); assertEquals(MetadataFileNameCreator.class, ftpProducer.filenameCreator().getClass()); }