@Test
	public void testSftpSource() {
		String streamName = generateStreamName();
		CounterSink counter = metrics().newCounterSink(streamName);
		stream().create(streamName, "sftp --user=%s --password=%s --port=%s --remoteDir=%s --localDir=%s "
						+ "--allowUnknownKeys=true | %s",
						// manual test; verify the key was added to the kh file
						// + "--allowUnknownKeys=true "
						// + "--knownHostsExpression=systemProperties[\"user.home\"]+\"/.ssh/known_hosts\" | %s",
				server.getUser(), server.getPassword(), server.getPort(), server.getSourceSftpDirectory(),
				server.getTargetLocalDirectory(), counter);
		assertThat(counter, eventually(hasValue("2")));
	}
Tests for SFTP source module.

@author Ilayaperumal Gopinathan
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/AbstractSftpSourceTests.java