MuleMessage message = new DefaultMuleMessage(MESSAGE, muleContext);
message.setOutboundProperty(MailProperties.TO_ADDRESSES_PROPERTY, EMAIL);
MuleSession session = getTestSession(null, muleContext);
DefaultMuleEvent event = new DefaultMuleEvent(message, MessageExchangePattern.ONE_WAY,
getTestService("apple", Apple.class), session, new ResponseOutputStream(System.out));
endpoint.process(event);
getServers().waitForIncomingEmail(AbstractEmailFunctionalTestCase.DELIVERY_DELAY_MS, 1);
MimeMessage[] messages = getServers().getReceivedMessages();
assertNotNull("did not receive any messages", messages);
assertEquals("did not receive 1 mail", 1, messages.length);