assertMailboxReceivedMessages("route-test-copy@localhost");
}
protected void assertMailboxReceivedMessages(String name) throws Exception {
Mailbox mailbox = Mailbox.get(name);
assertEquals(name + " should have received 1 mail", 1, mailbox.size());
Message message = mailbox.get(0);
assertNotNull(name + " should have received at least one mail!", message);
Object content = message.getContent();
assertNotNull("The content should not be null!", content);
if (content instanceof InputStream) {
assertEquals("hello world!", IOConverter.toString((InputStream)content, null));