Runs the test case.
Document doc;
DOMImplementation domImpl;
Document docAlt;
DocumentType docType = null;
NamedNodeMap attributes;
NodeList elementList;
Element element;
Attr attrAlt;
Node newNode;
String nullNS = null;
doc = (Document) load("staffNS", true);
elementList = doc.getElementsByTagNameNS("*", "address");
element = (Element) elementList.item(1);
attributes = element.getAttributes();
domImpl = doc.getImplementation();
docAlt = domImpl.createDocument(nullNS, "newDoc", docType);
attrAlt = docAlt.createAttributeNS(nullNS, "street");
{
boolean success = false;
try {
newNode = attributes.setNamedItemNS(attrAlt);
} catch (DOMException ex) {
success = (ex.code == DOMException.WRONG_DOCUMENT_ERR);
}
assertTrue("throw_WRONG_DOCUMENT_ERR", success);
}