@Test
	public void testUsingLabels() throws IOException {
		FileSink sink1 = newFileSink().binary(true);
		FileSink sink2 = newFileSink().binary(true);

		HttpSource source = newHttpSource();

		String streamName = generateStreamName();
		stream().create(streamName, "%s | flibble: transform --expression=payload.toUpperCase() | %s", source, sink1);
		stream().create(generateStreamName(),
				"%s.flibble > transform --expression=payload.replaceAll('a','.') | %s", getTapName(streamName), sink2);

		source.ensureReady().postData("Dracarys!");

		assertThat(sink1, eventually(hasContentsThat(equalTo("DRACARYS!"))));

		assertThat(sink2, eventually(hasContentsThat(equalTo("DRACARYS!"))));
	}
Test a stream that is simply one processor module connecting two named channels.
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/AbstractStreamCommandsTests.java