assertEquals("From: JD <john.doe@acme.org>, "
+ "Mary Smith <mary@example.net>", decode(field.getRaw()));
}
public void testTo() throws Exception {
Mailbox mailbox1 = Mailbox.parse("JD <john.doe@acme.org>");
Mailbox mailbox2 = Mailbox.parse("jane.doe@example.org");
Mailbox mailbox3 = Mailbox.parse("Mary Smith <mary@example.net>");
Group group = new Group("The Does", mailbox1, mailbox2);
AddressListField field = Fields.to(group);
assertEquals("To: The Does: JD <john.doe@acme.org>, "
+ "jane.doe@example.org;", decode(field.getRaw()));