@Test
	public void streamChannelTests() throws InterruptedException {
		ModuleDefinition moduleDefinition = TestModuleDefinitions.dummy("testing", ModuleType.processor);
		Module module = mock(Module.class);
		when(module.getDescriptor()).thenReturn(new ModuleDescriptor.Builder()
				.setGroup("foo")
				.setIndex(1)
				.setModuleDefinition(moduleDefinition)
				.build());
		when(module.getType()).thenReturn(moduleDefinition.getType());
		when(module.getName()).thenReturn(moduleDefinition.getName());
		when(module.getComponent(MessageBus.class)).thenReturn(bus);
		when(module.getComponent("input", MessageChannel.class)).thenReturn(input);
		when(module.getComponent("output", MessageChannel.class)).thenReturn(output);
		plugin.preProcessModule(module);
		plugin.postProcessModule(module);
		verify(bus).bindConsumer(eq("foo.0"), same(input), any(Properties.class));
		verify(bus).bindProducer(eq("foo.1"), same(output), any(Properties.class));
		plugin.beforeShutdown(module);
		plugin.removeModule(module);
		verify(bus).unbindConsumer("foo.0", input);
		verify(bus).unbindProducer("foo.1", output);
		verify(bus).unbindProducers("tap:stream:foo.testing.1");
	}
@author Mark Fisher
@author Jennifer Hickey
@author Gary Russell
@author David Turanski
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/plugins/stream/StreamPluginTests.java