use of org.mule.runtime.core.internal.processor.AsyncDelegateMessageProcessor in project mule by mulesoft.
the class AsyncRequestReplyRequesterTestCase method testSingleEventNoTimeoutAsync.
@Test
public void testSingleEventNoTimeoutAsync() throws Exception {
asyncReplyMP = new TestAsyncRequestReplyRequester(muleContext);
SensingNullMessageProcessor target = getSensingNullMessageProcessor();
AsyncDelegateMessageProcessor asyncMP = createAsyncMessageProcessor(target);
initialiseIfNeeded(asyncMP, true, muleContext);
asyncMP.start();
asyncReplyMP.setListener(asyncMP);
asyncReplyMP.setReplySource(target.getMessageSource());
asyncReplyMP.setMuleContext(muleContext);
CoreEvent resultEvent = asyncReplyMP.process(testEvent());
// Can't assert same because we copy event for async and also on async reply currently
assertEquals(((PrivilegedEvent) testEvent()).getMessageAsString(muleContext), ((PrivilegedEvent) resultEvent).getMessageAsString(muleContext));
}
Aggregations