FtpConsumer extends FtpConsumerImpl { public void setWorkDirectory(String s) { workDirectory = s; } FtpConsumer(); @Override void init(); String getProcDirectory(); String getWorkDirectory(); void setProcDirectory(String s); void setWorkDirectory(String s); String getWipSuffix(); void setWipSuffix(String s);  }
@Test public void testConsume_ForceRelativePath() throws Exception { int count = 1; EmbeddedFtpServer helper = new EmbeddedFtpServer(); MockMessageListener listener = new MockMessageListener(100); FakeFtpServer server = helper.createAndStart(helper.createFilesystem(count)); StandaloneConsumer sc = null; try { FtpConsumer ftpConsumer = createForTests(listener, "testConsume_ForceRelativePath"); ftpConsumer.setWorkDirectory(SLASH + DEFAULT_WORK_DIR_NAME); FtpConnection consumeConnection = create(server); consumeConnection.setForceRelativePath(Boolean.TRUE); sc = new StandaloneConsumer(consumeConnection, ftpConsumer); start(sc); waitForMessages(listener, count); helper.assertMessages(listener.getMessages(), count); } catch (Exception e) { throw e; } finally { stop(sc); server.stop(); } }