assertEquals("From: JD <john.doe@acme.org>, "
+ "Mary Smith <mary@example.net>", decode(field));
}
public void testTo() throws Exception {
Mailbox mailbox1 = AddressBuilder.DEFAULT.parseMailbox("JD <john.doe@acme.org>");
Mailbox mailbox2 = AddressBuilder.DEFAULT.parseMailbox("jane.doe@example.org");
Mailbox mailbox3 = AddressBuilder.DEFAULT.parseMailbox("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));