Runs the test case.
Document doc;
Element rootNode;
Node newChild;
NodeList elementList;
Node refChild;
Node insertedNode;
doc = (Document) load("hc_staff", true);
newChild = doc.createAttribute("title");
elementList = doc.getElementsByTagName("p");
refChild = elementList.item(1);
rootNode = (Element) refChild.getParentNode();
{
boolean success = false;
try {
insertedNode = rootNode.insertBefore(newChild, refChild);
} catch (DOMException ex) {
success = (ex.code == DOMException.HIERARCHY_REQUEST_ERR);
}
assertTrue("throw_HIERARCHY_REQUEST_ERR", success);
}