@Test
	public void testBasicSinkModuleBehavior() throws IOException {
		FtpSink ftpSink = newFtpSink();
		FileSource fileSource = newFileSource();

		fileSource.appendToFile(HELLO_FTP_SINK);

		ftpSink.ensureStarted();

		stream().create(generateStreamName(), "%s | %s", fileSource, ftpSink);

		String[] files = ftpSink.getRemoteServerDirectory().list();

		assertThat("only one file should have been created !", files.length, is(1));

		List<String> lines = Files.readAllLines(
				Paths.get(ftpSink.getRemoteServerDirectory().getAbsolutePath(), files[0]), StandardCharsets.UTF_8);

		assertThat(lines, hasSize(1));
		assertThat(lines, contains(HELLO_FTP_SINK));
	}
Tests for the FTP source.

@author Eric Bottard
@author Gunnar Hillert
@author Franck Marchand
@author David Turanski
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/AbstractFtpModulesTests.java