MessageHandler inHandler = mock(MessageHandler.class);
Connection conn = mock(Connection.class);
MessageHandler handler = createMessageHandler(outHandler, inHandler);
Collection<Message> message = handler.listMessages(conn, new MessageCriteria());
Assert.assertEquals(0, message.size());
verify(outHandler).listMessages(any(Connection.class), any(MessageCriteria.class));
verify(inHandler).listMessages(any(Connection.class), any(MessageCriteria.class));
}