Runs the test case.
Document doc;
Node oldChild;
Node newChild;
NodeList elementList;
Node elementNode;
Node replacedNode;
doc = (Document) load("staff", true);
newChild = doc.createElement("newChild");
oldChild = doc.createElement("oldChild");
elementList = doc.getElementsByTagName("employee");
elementNode = elementList.item(1);
{
boolean success = false;
try {
replacedNode = elementNode.replaceChild(newChild, oldChild);
} catch (DOMException ex) {
success = (ex.code == DOMException.NOT_FOUND_ERR);
}
assertTrue("throw_NOT_FOUND_ERR", success);
}