}
}).when(mockNotificationManager).fireNotification(Mockito.any(ServerNotification.class));
MuleEvent result = messageProcessorNotificationExecutionInterceptor.execute(mockMessageProcessor, mockMuleEvent);
assertThat(result, is(mockResultMuleEvent));
assertThat(serverNotifications.size(),Is.is(2));
MessageProcessorNotification beforeMessageProcessorNotification = (MessageProcessorNotification) serverNotifications.get(0);
MessageProcessorNotification afterMessageProcessorNotification = (MessageProcessorNotification) serverNotifications.get(1);
assertThat(beforeMessageProcessorNotification.getAction(), is(MessageProcessorNotification.MESSAGE_PROCESSOR_PRE_INVOKE));
assertThat(beforeMessageProcessorNotification.getProcessor(), is(mockMessageProcessor));
assertThat(beforeMessageProcessorNotification.getExceptionThrown(), IsNull.nullValue());
assertThat(afterMessageProcessorNotification.getAction(), is(MessageProcessorNotification.MESSAGE_PROCESSOR_POST_INVOKE));
assertThat(afterMessageProcessorNotification.getProcessor(), is(mockMessageProcessor));
assertThat(afterMessageProcessorNotification.getExceptionThrown(), IsNull.nullValue());
}