public void testMailboxList() {
List<Mailbox> al = new ArrayList<Mailbox>();
al.add(new Mailbox("local","example.com"));
// shared arraylist
MailboxList ml = new MailboxList(al, true);
assertEquals(1, ml.size());
al.add(new Mailbox("local2", "foo.example.com"));
assertEquals(2, ml.size());
// cloned arraylist
MailboxList mlcopy = new MailboxList(al, false);
assertEquals(2, mlcopy.size());
al.add(new Mailbox("local3", "bar.example.com"));
assertEquals(2, mlcopy.size());
}