Address a = new Address();
a.setDisplayName("A. G. Bell");
a.setReference(new Reference("sip:agb@bell-telephone.com"));
a.getParameters().add("tag", "a48s");
AddressWriter w = new AddressWriter();
assertEquals("\"A. G. Bell\" <sip:agb@bell-telephone.com> ;tag=a48s", w
.append(a).toString());
w = new AddressWriter();
a = new Address();
a.setDisplayName(null);
a.setReference(new Reference("sip:agb@bell-telephone.com"));
a.getParameters().add("tag", "a48s");
assertEquals("<sip:agb@bell-telephone.com> ;tag=a48s", w.append(a)
.toString());
}