assertEquals("foo12", message.getPayload());
}
@Test
public void testCompositeSink() {
ModuleDescriptor processor1Descriptor = new ModuleDescriptor.Builder()
.setModuleDefinition(processor1Definition)
.setGroup("compositesinkgroup")
.build();
ModuleDescriptor processor2Descriptor = new ModuleDescriptor.Builder()
.setModuleDefinition(processor2Definition)
.setGroup("compositesinkgroup")
.build();
ModuleDescriptor sinkDescriptor = new ModuleDescriptor.Builder()
.setModuleDefinition(sinkDefinition)
.setGroup("compositesinkgroup")
.build();
ModuleDefinition composed = ModuleDefinitions.composed("compositesink", ModuleType.sink,
"processor1 | processor2 | sink",
Arrays.asList(processor1Definition, processor2Definition, sinkDefinition));
//parser results being reversed, we emulate here
List<ModuleDescriptor> children = Arrays.asList(sinkDescriptor, processor2Descriptor, processor1Descriptor);
ModuleDescriptor compositeDescriptor = new ModuleDescriptor.Builder()
.setModuleDefinition(composed)
.setGroup("compositesinkgroup")
.addChildren(children)
.setIndex(2)
.build();