private void setupTestMails(MockMailRepository mailRep) throws MessagingException {
ArrayList recipients = new ArrayList();
recipients.add(new MailAddress("recipient@test.com"));
MimeMessage mw = new MimeMessageCopyOnWriteProxy(
new MimeMessageInputStreamSource(
"test",
new SharedByteArrayInputStream(
("Return-path: return@test.com\r\n"+
"Content-Transfer-Encoding: plain\r\n"+
"Subject: test\r\n\r\n"+
"Body Text\r\n").getBytes())));
MailImpl m = new MailImpl("name", new MailAddress("from@test.com"),
recipients, mw);
mailRep.store(m);
MimeMessage mw2 = new MimeMessageCopyOnWriteProxy(
new MimeMessageInputStreamSource(
"test2",
new SharedByteArrayInputStream(
("").getBytes())));
MailImpl mailimpl2 = new MailImpl("name2", new MailAddress("from@test.com"),
recipients, mw2);