@Test
	public void testSftpSourceWithFileNamePattern() {
		String streamName = generateStreamName();
		CounterSink counter = metrics().newCounterSink(streamName);
		stream().create(streamName,
				"sftp --user=%s --password=%s --port=%s --remoteDir=%s --localDir=%s --pattern=%s "
						+ "--allowUnknownKeys=true | %s",
				server.getUser(), server.getPassword(), server.getPort(), server.getSourceSftpDirectory(),
				server.getTargetLocalDirectory(), "*.txt", counter);
		assertThat(counter, eventually(hasValue("1")));
	}
Tests for SFTP source module.

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