}
@Test
public void testParameterable() throws Exception
{
Parameterable orig = new ParameterableImpl("\"Hello World\" <sip:foo@bar.com;transport=tcp>;tag=12345");
Parameterable readOnly = new ReadOnlyParameterable((Parameterable) orig.clone());
assertEquals(orig, readOnly);
try { readOnly.setParameter("foo", "bar"); fail();} catch (IllegalStateException e) {}
try { readOnly.removeParameter("tag"); fail();} catch (IllegalStateException e) {}
try { readOnly.setValue(""); fail();} catch (IllegalStateException e) {}
assertEquals(orig, readOnly);
assertEquals(readOnly, orig);
assertEquals(orig.toString(), readOnly.toString());
Parameterable clone = (Parameterable) readOnly.clone();
clone.setParameter("a", "b");
testSerializable(readOnly);
}