@Test
	public void testTappingModulesVariations() throws IOException {
		// Note: this test is using a regular sink, not a named channel sink
		HttpSource httpSource = newHttpSource();

		FileSink sink = newFileSink().binary(true);
		FileSink tapsink3 = newFileSink().binary(true);
		FileSink tapsink5 = newFileSink().binary(true);
		FileSink tapsink6 = newFileSink().binary(true);

		String streamName = generateStreamName();
		stream().create(streamName, "%s | transform --expression=payload.toUpperCase() | %s", httpSource, sink);
		stream().create(generateStreamName(), "%s > transform --expression=payload.replaceAll('A','.') | %s",
				getTapName(streamName), tapsink3);
		stream().create(generateStreamName(),
				"%s.transform > transform --expression=payload.replaceAll('A','.') | %s", getTapName(streamName),
				tapsink5);
		stream().create(generateStreamName(),
				"%s.0 > transform --expression=payload.replaceAll('A','.') | %s", getTapName(streamName), tapsink6);
		// use the tap channel as a sink. Not very useful currently but will be once we allow users to create pub/sub
		// channels
		// stream().create(getRandomStreamName(), "%s > %s.transform",
		// httpSource2, getTapName(streamName));

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

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

		assertThat(tapsink3, eventually(hasContentsThat(equalTo("Dracarys!"))));

		assertThat(tapsink5, eventually(hasContentsThat(equalTo("DR.C.RYS!"))));

		assertThat(tapsink6, eventually(hasContentsThat(equalTo("Dracarys!"))));


		// httpSource2.ensureReady().postData("TESTPLAN");
		// our tap got the data and transformed appropriately
		// assertThat(tapsink5, eventually(hasContentsThat(equalTo("DR.C.RYS!TESTPL.N"))));

		// other tap did not get data
		// assertThat(tapsink3, 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