public void test_XMLAttributes_clone() { XMLAttributes att1 = new XMLAttributes(); att1.add("xmlns", "http://foo.org/"); assertTrue( att1.getLength() == 1 ); assertTrue( att1.isEmpty() == false ); assertTrue( att1.getIndex("xmlns") == 0 ); assertTrue( att1.getName(0) == "xmlns" ); assertTrue( att1.getValue("xmlns") == "http://foo.org/" ); XMLAttributes att2 = (XMLAttributes) att1.clone(); assertTrue( att2.getLength() == 1 ); assertTrue( att2.isEmpty() == false ); assertTrue( att2.getIndex("xmlns") == 0 ); assertTrue( att2.getName(0) == "xmlns" ); assertTrue( att2.getValue("xmlns") == "http://foo.org/" ); att2 = null; att1 = null; }