/*
   * Runs the test case.
   */
  void runTest()
  {
     Document doc;
     EntityReference newEntRefNode;
     String entRefValue;
     String entRefName;
     int entRefType;
     doc = (Document) baseT::load("staff", true);
     newEntRefNode = doc.createEntityReference(SA::construct_from_utf8("ent1"));
     baseT::assertNotNull(newEntRefNode, __LINE__, __FILE__);
     entRefValue = newEntRefNode.getNodeValue();
     baseT::assertNull(entRefValue, __LINE__, __FILE__);
     entRefName = newEntRefNode.getNodeName();
     baseT::assertEquals("ent1", entRefName, __LINE__, __FILE__);
 entRefType = (int) newEntRefNode.getNodeType();
     baseT::assertEquals(5, entRefType, __LINE__, __FILE__);
 
  }
   /*
    * Runs the test case.
    */
   void runTest()
   {
      Document doc;
      NodeList genderList;
      Node genderNode;
      EntityReference entRef;
      Node entNode;
      Element entElement;
      CharacterData entElementText;
      int nodeType;
      doc = (Document) baseT::load("staff", true);
      genderList = doc.getElementsByTagName(SA::construct_from_utf8("gender"));
      genderNode = genderList.item(2);
      entNode = genderNode.getFirstChild();
      baseT::template skipIfNot<EntityReference>(entNode);
     entRef = (EntityReference) genderNode.getFirstChild();
      baseT::assertNotNull(entRef, __LINE__, __FILE__);
      nodeType = (int) entRef.getNodeType();
      
      if (baseT::equals(1, nodeType)) {
          entRef = doc.createEntityReference(SA::construct_from_utf8("ent4"));
      baseT::assertNotNull(entRef, __LINE__, __FILE__);
      }
    entElement = (Element) entRef.getFirstChild();
      baseT::assertNotNull(entElement, __LINE__, __FILE__);
      entElementText = (CharacterData) entElement.getFirstChild();
      baseT::assertNotNull(entElementText, __LINE__, __FILE__);
      
      {
         boolean success = false;
         try {
            entElementText.setNodeValue(SA::construct_from_utf8("newValue"));
          } catch (const DOMException& ex) {
            success = (ex.code() == DOMException::NO_MODIFICATION_ALLOWED_ERR);
         }
         assertTrue(success);
      }

   }