muleContext.registerListener(listener);
OutboundEndpoint endpoint = createOutboundEndpoint(null, null, null, null,
MessageExchangePattern.ONE_WAY, null);
MuleEvent outboundEvent = createTestOutboundEvent();
endpoint.process(outboundEvent);
assertTrue(listener.latch.await(RECEIVE_TIMEOUT, TimeUnit.MILLISECONDS));
assertEquals(2, listener.messageNotificationList.size());
assertEquals(EndpointMessageNotification.MESSAGE_DISPATCH_BEGIN, listener.messageNotificationList.get(0).getAction());
assertEquals(EndpointMessageNotification.MESSAGE_DISPATCH_END, listener.messageNotificationList.get(1).getAction());