@Test
	public void testThatInputOutputChannelsAreBound() {

		ModuleDescriptor moduleDescriptor = new ModuleDescriptor.Builder()
				.setModuleDefinition(TestModuleDefinitions.dummy("myjob", ModuleType.job))
				.setGroup("myjob")
				.setIndex(0)
				.build();

		final Module module = new ResourceConfiguredModule(moduleDescriptor,
				new ModuleDeploymentProperties());

		final TestMessageBus messageBus = new TestMessageBus();
		final JobPlugin plugin = new JobPlugin(messageBus);
		final DirectChannel inputChannel = new DirectChannel();

		final Module spiedModule = spy(module);

		doReturn(inputChannel).when(spiedModule).getComponent("input", MessageChannel.class);
		doReturn(null).when(spiedModule).getComponent("output", MessageChannel.class);
		doReturn(null).when(spiedModule).getComponent("stepExecutionRequests.output", MessageChannel.class);

		plugin.postProcessModule(spiedModule);

		assertEquals(Integer.valueOf(1), Integer.valueOf(messageBus.getConsumerNames().size()));
		assertEquals(Integer.valueOf(0), Integer.valueOf(messageBus.getProducerNames().size()));

		assertEquals("job:myjob", messageBus.getConsumerNames().get(0));

	}
@author Michael Minella
@author Gunnar Hillert
@author Gary Russell
@author Ilayaperumal Gopinathan
@author David Turanski
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/plugins/job/JobPluginTests.java