EntityReference docReferenceEntity = doc.createEntityReference("ourEntityNode");
docBodyLevel24.appendChild(docReferenceEntity);
DTest make = new DTest();
Notation docNotation = make.createNotation(doc, "ourNotationNode");
// NotationImpl docNotation = new NotationImpl((DocumentImpl) doc, "ourNotationNode");//*****?
DocumentType docType = (DocumentType)doc.getFirstChild();
docType.getNotations().setNamedItem(docNotation);
DocumentFragment docDocFragment = doc.createDocumentFragment();
// System.out.println("This document's first element name is " + docFirstElement.getTagName() + "\n");
//***********Following are for errorTests
Text docNode3 = doc.createTextNode(name + "docTextNode3");
Text docNode4 = doc.createTextNode(name + "docTextNode4");
Entity docEntity = (Entity) doc.getDoctype().getEntities().getNamedItem("ourEntityNode"); // Get the Entity node
DocumentType docDocType = (DocumentType) doc.getFirstChild(); // Get the DocumentType node
EntityReference entityReferenceText = (EntityReference) doc.getLastChild().getLastChild().getLastChild().getFirstChild();
Text entityReferenceText2 = doc.createTextNode("entityReferenceText information");
//************************************************* ERROR TESTS
DTest tests = new DTest();
OK &= Assertion.verify(DTest.DOMExceptionsTest(document, "appendChild", new Class[]{Node.class}, new Object[]{docBody}, DOMException.HIERARCHY_REQUEST_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(docNode3, "appendChild", new Class[]{Node.class}, new Object[]{docNode4}, DOMException.HIERARCHY_REQUEST_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(doc, "insertBefore", new Class[]{Node.class, Node.class}, new Object[]{docEntity, docFirstElement}, DOMException.HIERARCHY_REQUEST_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(doc, "replaceChild", new Class[]{Node.class, Node.class}, new Object[]{docCDATASection, docFirstElement}, DOMException.HIERARCHY_REQUEST_ERR ));
docFirstElement.setNodeValue("This shouldn't do anything!");
OK &= Assertion.verify(docFirstElement.getNodeValue() == null);
docReferenceEntity.setNodeValue("This shouldn't do anything!");
OK &= Assertion.verify(docReferenceEntity.getNodeValue() == null);
docEntity.setNodeValue("This shouldn't do anything!");
OK &= Assertion.verify(docEntity.getNodeValue() == null);
doc.setNodeValue("This shouldn't do anything!");
OK &= Assertion.verify(doc.getNodeValue() == null);
docType.setNodeValue("This shouldn't do anything!");
OK &= Assertion.verify(docType.getNodeValue() == null);
docDocFragment.setNodeValue("This shouldn't do anything!");
OK &= Assertion.verify(docDocFragment.getNodeValue() == null);
docNotation.setNodeValue("This shouldn't do anything!");
OK &= Assertion.verify(docNotation.getNodeValue() == null);
OK &= Assertion.verify(DTest.DOMExceptionsTest(docReferenceEntity, "appendChild", new Class[]{Node.class}, new Object[]{entityReferenceText2 }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(docBodyLevel32, "insertBefore", new Class[]{Node.class, Node.class}, new Object[]{docTextNode11,docBody }, DOMException.NOT_FOUND_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(docBodyLevel32, "removeChild", new Class[]{Node.class}, new Object[]{docFirstElement}, DOMException.NOT_FOUND_ERR ));
OK &= Assertion.verify(DTest.DOMExceptionsTest(docBodyLevel32, "replaceChild", new Class[]{Node.class, Node.class}, new Object[]{docTextNode11,docFirstElement }, DOMException.NOT_FOUND_ERR ));