TextImpl extends NodeImpl implements Text { public TextImpl(String text) { Assert.validXMLChars(text, "text"); this.text = text; } TextImpl(String text); @Override org.w3c.dom.Text asXmlNode(Document document); String getText(); String getPlainText(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testTextImpl() { new TextImpl("a"); new TextImpl(""); try { new TextImpl(null); fail("Expected NullPointerException"); } catch (NullPointerException e) { } try { new TextImpl("te\fxt\f"); } catch (IllegalArgumentException e) { } }