@Test
	public void testCompositeSource() {
		ModuleDescriptor sourceDescriptor = new ModuleDescriptor.Builder()
				.setModuleDefinition(sourceDefinition).setGroup("compositesourcegroup").setIndex(0).build();
		ModuleDescriptor processor1Descriptor = new ModuleDescriptor.Builder()
				.setModuleDefinition(processor1Definition).setGroup("compositesourcegroup").setIndex(1).build();
		ModuleDescriptor processor2Descriptor = new ModuleDescriptor.Builder()
				.setModuleDefinition(processor2Definition).setGroup("compositesourcegroup").setIndex(2).build();

		ModuleDefinition composed = ModuleDefinitions.composed("compositesource", ModuleType.source,
				"source | processor1 | processor2",
				Arrays.asList(sourceDefinition, processor1Definition, processor2Definition));


		//parser results being reversed, we emulate here
		List<ModuleDescriptor> children = Arrays.asList(processor2Descriptor, processor1Descriptor, sourceDescriptor);
		ModuleDescriptor compositeDescriptor = new ModuleDescriptor.Builder()
				.setModuleDefinition(composed)
				.setGroup("compositesourcegroup")
				.addChildren(children)
				.build();
		Module module = moduleFactory.createModule(compositeDescriptor, deploymentProperties);
		assertTrue(module instanceof CompositeModule);
		assertEquals(source, module.getType());
		module.initialize();
		Object endpoint = module.getApplicationContext().getBean("bridge-1");
		assertNotNull(endpoint);
		assertEquals("bridge-1", TestUtils.getPropertyValue(endpoint, "beanName"));
		assertEquals("bridge-1", TestUtils.getPropertyValue(endpoint, "componentName"));
	}
@author Mark Fisher
@author David Turanski
@author Gary Russell
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/module/CompositeModuleTests.java