@Test
    public void testGetStringFieldValue() {
        StringFieldValue text = getAnnotatedString();
        {
            SpanTree tree = text.getSpanTree("ballooo");
            assertSame(text, tree.getStringFieldValue());

            AlternateSpanList root = (AlternateSpanList)tree.getRoot();
            Iterator<SpanNode> it = root.childIteratorRecursive();

            while (it.hasNext()) {
                assertSame(text, it.next().getStringFieldValue());
            }
        }
        {
            SpanTree tree = text.getSpanTree("fruits");
            assertSame(text, tree.getStringFieldValue());

            SpanList root = (SpanList)tree.getRoot();
            Iterator<SpanNode> it = root.childIteratorRecursive();

            while (it.hasNext()) {
                assertSame(text, it.next().getStringFieldValue());
            }
        }
        {
            SpanTree tree = text.removeSpanTree("ballooo");
            assertNull(tree.getStringFieldValue());

            AlternateSpanList root = (AlternateSpanList)tree.getRoot();
            Iterator<SpanNode> it = root.childIteratorRecursive();

            while (it.hasNext()) {
                assertNull(it.next().getStringFieldValue());
            }
        }
        {
            SpanTree tree = text.removeSpanTree("fruits");
            assertNull(tree.getStringFieldValue());

            SpanList root = (SpanList)tree.getRoot();
            Iterator<SpanNode> it = root.childIteratorRecursive();

            while (it.hasNext()) {
                assertNull(it.next().getStringFieldValue());
            }
        }
    }
@author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
document/src/test/java/com/yahoo/document/annotation/SpanListTestCase.java