List<InternetAddress> recipients = new ArrayList<InternetAddress>();
recipients.add(recipient);
String subject = "Subject";
String plaintext = "Plaintext";
String html = "<p>Hello, world.</p>";
Message message = new GaeEmailUtils().createMultipartMessage(sender, recipients, replyTo, subject, plaintext, html);
assertNotNull(message);
assertEquals(1, message.getReplyTo().length);
assertEquals(replyTo, message.getReplyTo()[0]);
assertEquals(1, message.getFrom().length);
assertEquals(sender, message.getFrom()[0]);
assertNull(message.getRecipients(RecipientType.CC));
assertNull(message.getRecipients(RecipientType.BCC));
assertEquals(1, message.getRecipients(RecipientType.TO).length);
assertEquals(recipient, message.getRecipients(RecipientType.TO)[0]);
assertTrue(message.getContent() instanceof Multipart);
Multipart multipart = (Multipart) message.getContent();
assertEquals(2, multipart.getCount());
assertEquals("text/plain; charset=\"iso-8859-1\"", multipart.getBodyPart(0).getContentType());
assertEquals(plaintext, multipart.getBodyPart(0).getContent());
assertEquals(plaintext, new GaeEmailUtils().getTextPart(message));
assertEquals("text/html; charset=\"iso-8859-1\"", multipart.getBodyPart(1).getContentType()); // seems like this ought to be text/html ???