Address orig = new NameAddr("\"Hello World\" <sip:foo@bar.com;transport=tcp>;tag=12345");
Address readOnly = new ReadOnlyAddress((Address) orig.clone());
assertEquals(orig, readOnly);
try { readOnly.setParameter("foo", "bar"); fail();} catch (IllegalStateException e) {}
try { readOnly.removeParameter("tag"); fail();} catch (IllegalStateException e) {}
try { readOnly.setDisplayName(""); fail();} catch (IllegalStateException e) {}
try { ((SipURI) readOnly.getURI()).removeParameter("transport"); fail();} catch (IllegalStateException e) {}
try { ((SipURI) readOnly.getURI()).setUser("foo2"); fail();} catch (IllegalStateException e) {}
assertEquals(orig, readOnly);