processors = endpoint.getResponseMessageProcessors();
assertNotNull(processors);
assertEquals(1, processors.size());
assertTrue(processors.get(0) instanceof MessageProcessorChain);
MessageProcessorChain chain = (MessageProcessorChain) processors.get(0);
assertEquals(2, chain.getMessageProcessors().size());
assertEquals("C", ((TestMessageProcessor) chain.getMessageProcessors().get(0)).getLabel());
assertEquals("D", ((TestMessageProcessor) chain.getMessageProcessors().get(1)).getLabel());
MessageProcessor mp;
if (variant.equals(ConfigVariant.FLOW))
{
mp = ((Flow) muleContext.getRegistry().lookupObject("localEndpoints")).getMessageProcessors()
.get(0);
}
else
{
mp = ((OutboundPassThroughRouter) ((OutboundRouterCollection) muleContext.getRegistry()
.lookupService("localEndpoints")
.getOutboundMessageProcessor()).getRoutes().get(0)).getRoute("ep4");
}
endpoint = (ImmutableEndpoint) mp;
processors = endpoint.getMessageProcessors();
assertNotNull(processors);
assertEquals(2, processors.size());
assertEquals("E", ((TestMessageProcessor) processors.get(0)).getLabel());
assertEquals("F", ((TestMessageProcessor) processors.get(1)).getLabel());
processors = endpoint.getResponseMessageProcessors();
assertNotNull(processors);
assertEquals(1, processors.size());
assertTrue(processors.get(0) instanceof MessageProcessorChain);
chain = (MessageProcessorChain) processors.get(0);
assertEquals(2, chain.getMessageProcessors().size());
assertEquals("G", ((TestMessageProcessor) chain.getMessageProcessors().get(0)).getLabel());
assertEquals("H", ((TestMessageProcessor) chain.getMessageProcessors().get(1)).getLabel());
}