ArgumentCaptor<MessageListener> messageListenerCaptor = ArgumentCaptor
.forClass(MessageListener.class);
verify(listenerContainer).addMessageListener(messageListenerCaptor.capture(), any(Collection.class));
MessageListener messageListener = messageListenerCaptor.getValue();
messageListener.onMessage(new DefaultMessage(null, null), null);
messageListener.onMessage(new DefaultMessage(null, null), null);
mock.assertIsSatisfied();
}