public class Util {
private static final Random RANDOM = new Random();
public static MockMail createMockMail2Recipients(MimeMessage m) throws ParseException {
MockMail mockedMail = new MockMail();
mockedMail.setName("ID=" + RANDOM.nextLong());
mockedMail.setMessage(m);
mockedMail.setRecipients(Arrays.asList(new MailAddress("test@james.apache.org"),
new MailAddress("test2@james.apache.org")));
return mockedMail;
}