return mockFailingMessageProcessor.process((MuleEvent) invocationOnMock.getArguments()[0]);
}
});
MuleLockFactory muleLockFactory = new MuleLockFactory();
muleLockFactory.setMuleContext(mockMuleContext);
when(mockMuleContext.getRegistry().get(MuleProperties.OBJECT_LOCK_PROVIDER)).thenReturn(new SingleServerLockProvider());
muleLockFactory.initialise();
when(mockMuleContext.getLockFactory()).thenReturn(muleLockFactory);
when(mockMuleContext.getRegistry().get(MuleProperties.OBJECT_STORE_MANAGER)).thenReturn(mockObjectStoreManager);
final InMemoryObjectStore inMemoryObjectStore = new InMemoryObjectStore();
when(mockObjectStoreManager.getObjectStore(anyString(), anyBoolean(), anyInt(), anyInt(), anyInt())).thenAnswer(new Answer<ObjectStore>()