Runs the test case.
Document doc;
Node newChild;
NodeList elementList;
Node employeeNode;
NodeList childList;
Node oldChild;
Node replacedNode;
doc = (Document) load("hc_staff", true);
newChild = doc.getDocumentElement();
elementList = doc.getElementsByTagName("p");
employeeNode = elementList.item(1);
childList = employeeNode.getChildNodes();
oldChild = childList.item(0);
{
boolean success = false;
try {
replacedNode = employeeNode.replaceChild(newChild, oldChild);
} catch (DOMException ex) {
success = (ex.code == DOMException.HIERARCHY_REQUEST_ERR);
}
assertTrue("throw_HIERARCHY_REQUEST_ERR", success);
}