public void testLargeMessageBody() throws MessagingException, IOException {
String to = "to@localhost";
GreenMailUtil.sendMessageBody(to, "from@localhost", "Subject", createLargeByteArray(), "application/blubb",
greenMail.getSmtp().getServerSetup());
greenMail.waitForIncomingEmail(5000, 1);
<BUG>retrieveAndCheckBody(new Retriever(greenMail.getPop3()), to);
retrieveAndCheckBody(new Retriever(greenMail.getImap()), to);
}
private void retrieveAndCheck(Retriever retriever, String to) throws MessagingException, IOException {

Message[] messages = retriever.getMessages(to);</BUG>
assertEquals(1, messages.length);

public void testLargeMessageBody() throws MessagingException, IOException {
String to = "to@localhost";
GreenMailUtil.sendMessageBody(to, "from@localhost", "Subject", createLargeByteArray(), "application/blubb",
greenMail.getSmtp().getServerSetup());
greenMail.waitForIncomingEmail(5000, 1);
retrieveAndCheckBody(greenMail.getPop3(), to);
retrieveAndCheckBody(greenMail.getImap(), to);
}
private void retrieveAndCheck(AbstractServer server, String to) throws MessagingException, IOException {
Retriever retriever = new Retriever(server);
try {
Message[] messages = retriever.getMessages(to);
assertEquals(1, messages.length);
