@Test
    public void testToString() {
        SpanList root = new SpanList();
        AlternateSpanList branch = new AlternateSpanList();

        SpanNode sn1 = new Span(0, 5);
        SpanNode span1 = new Span(0, 3);
        root.add(sn1);
        branch.add(span1);
        root.add(branch);

        SpanNode span11 = new Span(0, 3);
        SpanNode span22 = new Span(1, 9);
        SpanNode span33 = new Span(12, 10);

        SpanList alternate = new SpanList();
        alternate.add(span11);
        alternate.add(span22);
        alternate.add(span33);

        List<SpanNode> subtreeList = new ArrayList<>();
        subtreeList.add(alternate);

        branch.setProbability(0, 100.0d);
        branch.addChildren(subtreeList, 50.0d);

        assertNotNull(root.toString());
        assertNotNull(branch.toString());
    }
@author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
document/src/test/java/com/yahoo/document/annotation/AlternateSpanListTestCase.java