@Test
	public void testUsingScript() {
		FileSink fileSink = newFileSink().binary(true);
		HttpSource httpSource = newHttpSource();

		stream().create(generateStreamName(), "queue:testUsingScript1 > transform --expression=payload+'-foo' | %s", fileSink);
		stream().create(generateStreamName(), "queue:testUsingScript2 > transform --expression=payload+'-bar' | %s", fileSink);
		stream().create(generateStreamName(),
				"%s | router --script='org/springframework/xd/shell/command/router.groovy'", httpSource);

		httpSource.ensureReady();
		httpSource.postData("a");
		assertThat(fileSink, eventually(hasContentsThat(equalTo("a-foo"))));
		httpSource.postData("b");
		assertThat(fileSink, eventually(hasContentsThat(equalTo("a-foob-bar"))));
	}
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