public void simple6() {
        StringFieldValue text = new StringFieldValue("<html><head><title>Diary</title></head><body>I live in San Francisco</body></html>");
                                                    //012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789

        SpanTree tree = text.getSpanTree("html");
        SpanList root = (SpanList) tree.getRoot();
        //TODO: Note that the above could have been a Span or an AlternateSpanList!

        ListIterator<SpanNode> nodeIt = root.childIterator();

        AnnotationType beginTag = new AnnotationType("begintag");
        AnnotationType endTag = new AnnotationType("endtag");


        while (nodeIt.hasNext()) {
            SpanNode node = nodeIt.next();
            boolean nodeHadMarkupAnnotation = removeMarkupAnnotation(tree, node);
            if (nodeHadMarkupAnnotation) {
                nodeIt.remove();
                List<Span> replacementNodes = analyzeMarkup(tree, node, text, beginTag, endTag);
                for (SpanNode repl : replacementNodes) {
                    nodeIt.add(repl);
                }
            }
        }
    }
Contains code snippets that are used in the documentation. Not really a test case.

@author Einar M R Rosenvinge
document/src/test/java/com/yahoo/document/annotation/DocTestCase.java