{
DefaultMessagingExceptionStrategy defaultMessagingExceptionStrategy = new DefaultMessagingExceptionStrategy();
when(mockMuleContext.getNotificationManager()).thenReturn(mock(ServerNotificationManager.class));
when(mockMuleContext.getRegistry()).thenReturn(mock(MuleRegistry.class));
defaultMessagingExceptionStrategy.setMuleContext(mockMuleContext);
defaultMessagingExceptionStrategy.handleException((Exception) invocationOnMock.getArguments()[0], (MuleEvent) invocationOnMock.getArguments()[1]);
return mockResultEvent;
}
});
return mockResultEvent;
}