@Test
	public void testDiscardsUsingExpression() {
		FileSink fileSink = newFileSink().binary(true);
		HttpSource httpSource = newHttpSource();
		String queue = generateQueueName();

		stream().create(generateStreamName(),
				"%s | router --expression='payload.contains(\"a\") ? \"%s\" : null'", httpSource, queue);
		stream().create(generateStreamName(), "%s > %s", queue, fileSink);

		httpSource.ensureReady().postData("a1");
		assertThat(fileSink, eventually(hasContentsThat(equalTo("a1"))));
		httpSource.postData("b1").postData("b2").postData("a2");
		assertThat(fileSink, eventually(hasContentsThat(equalTo("a1a2"))));
	}
Runs tests for the router sink module.

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