public void testRoundTrip() throws MuleException, InterruptedException
{
// first, check that the conversion happened - we should have a copy of
// the message as rfc822 encoded bytes on vm://rfc822
MuleClient client = muleContext.getClient();
MuleMessage message = client.request("vm://rfc822", RECEIVE_TIMEOUT);
assertTrue(message.getPayload() instanceof byte[]);
// next, check that the email is received in the server
greenMailSupport.getServers().waitForIncomingEmail(AbstractEmailFunctionalTestCase.DELIVERY_DELAY_MS, 1);
MimeMessage[] messages = greenMailSupport.getServers().getReceivedMessages();