// Non regression test for Issue 316 : createAddress can add spurious angle brackets
try {
AddressFactory addressFactory = SipFactory.getInstance().createAddressFactory();
String uriString = "<sip:1004@172.16.0.99;user=phone>";
try {
addressFactory.createURI(uriString);
fail("uriString should throw a ParseException because the angle brackets are not valid");
} catch (ParseException e) {}
try {
Address address = addressFactory.createAddress(uriString);
assertEquals(uriString, address.toString());