assertNull(mailbox1);
}
public void testParseMailboxList() throws Exception {
String s = "a , b, ,,, c, d,;garbage";
ByteSequence raw = ContentUtil.encode(s);
ParserCursor cursor = new ParserCursor(0, s.length());
List<Mailbox> mailboxes = parser.parseMailboxes(raw, cursor, RawFieldParser.INIT_BITSET(';'));
assertEquals(4, mailboxes.size());
Mailbox mailbox1 = mailboxes.get(0);
assertEquals("a", mailbox1.getAddress());
Mailbox mailbox2 = mailboxes.get(1);
assertEquals("b", mailbox2.getAddress());
Mailbox mailbox3 = mailboxes.get(2);
assertEquals("c", mailbox3.getAddress());
Mailbox mailbox4 = mailboxes.get(3);
assertEquals("d", mailbox4.getAddress());
assertEquals(';', raw.byteAt(cursor.getPos()));
}