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