Span extends Component implements TextHyperlinkContainer { public void appendTextContent(String content) { appendTextContent(content, true); } private  Span(TextSpanElement element); static Span getInstanceof(TextSpanElement sElement); static Span newSpan(TextSelection textSelection); DefaultStyleHandler getStyleHandler(); Document getOwnerDocument(); @Override TextSpanElement getOdfElement(); void removeTextContent(); void setTextContent(String content); String getTextContent(); void appendTextContent(String content); void appendTextContent(String content, boolean isStyleInherited); TextHyperlink applyHyperlink(URI linkto); Iterator<TextHyperlink> getHyperlinkIterator(); void removeHyperlinks(); TextHyperlink appendHyperlink(String text, URI linkto);  }
@Test public void testAppendTextContent() { try { TextDocument doc = TextDocument.newTextDocument(); doc.addParagraph("This is a test paragraph!"); TextNavigation navigation = new TextNavigation("test", doc); TextSelection sel = (TextSelection) navigation.nextSelection(); Span span = Span.newSpan(sel); span.appendTextContent("hello world."); Assert.assertEquals("testhello world.", span.getTextContent()); } catch (Exception e) { Logger.getLogger(SpanTest.class.getName()).log(Level.SEVERE, null, e); Assert.fail(); } }