assertTrue(transformers.get(1) instanceof TestResponseTransformer);
}
public void testGlobalEndpoints() throws MuleException
{
Service service = muleContext.getRegistry().lookupService("globalEndpoints");
ImmutableEndpoint endpoint = ((ServiceCompositeMessageSource) service.getMessageSource()).getEndpoints().get(0);
List <MessageProcessor> processors = endpoint.getMessageProcessors();
assertNotNull(processors);
assertEquals(1, processors.size());
assertTrue(processors.get(0) instanceof TestInboundTransformer);
// For backwards-compatibility only
List <Transformer> transformers = endpoint.getTransformers();
assertNotNull(transformers);
assertEquals(1, transformers.size());
assertTrue(transformers.get(0) instanceof TestInboundTransformer);
processors = endpoint.getResponseMessageProcessors();
assertNotNull(processors);
assertEquals(1, processors.size());
assertTrue(processors.get(0) instanceof TestResponseTransformer);
// For backwards-compatibility only
transformers = endpoint.getResponseTransformers();
assertNotNull(transformers);
assertEquals(1, transformers.size());
assertTrue(transformers.get(0) instanceof TestResponseTransformer);
endpoint = (ImmutableEndpoint) ((OutboundPassThroughRouter) ((OutboundRouterCollection) service.getOutboundMessageProcessor()).getRoutes()
.get(0)).getRoutes().get(0);
processors = endpoint.getMessageProcessors();
assertNotNull(processors);
assertEquals(2, processors.size());