use of org.mule.runtime.core.privileged.processor.chain.DefaultMessageProcessorChainBuilder in project mule by mulesoft.
the class ResponseMessageProcessorAdapterTestCase method testResponseAdaptorSingleMPReturnsNull.
@Test
public void testResponseAdaptorSingleMPReturnsNull() throws Exception {
DefaultMessageProcessorChainBuilder builder = new DefaultMessageProcessorChainBuilder();
final ResponseMessageProcessorAdapter responseMessageProcessorAdapter = new ResponseMessageProcessorAdapter(new ReturnNullMP());
responseMessageProcessorAdapter.setMuleContext(muleContext);
builder.chain(createStringAppendTransformer("1"), responseMessageProcessorAdapter, createStringAppendTransformer("2"));
assertEquals("012", ((PrivilegedEvent) process(builder.build(), eventBuilder(muleContext).message(of("0")).build())).getMessageAsString(muleContext));
}
Aggregations