FileSinkFactoryFactory implements SinkFactoryFactory { @Override public SinkFactory createSinkFactory(String baseDir) { return new FileSinkFactory(baseDir); }  @Override SinkFactory createSinkFactory(String baseDir);  }
@Test public void test() { final FileSinkFactoryFactory factoryFactory = new FileSinkFactoryFactory(); final FileSinkFactory sinkFactory = (FileSinkFactory)factoryFactory.createSinkFactory("whatever"); assertEquals("whatever", sinkFactory.destDirName); }