@Before
    public void buildTree() {
        tree.cleanup();
        span1 = new Span(0, 3);
        span2 = new Span(4, 6);
        span3 = new Span(6, 10);

        span11 = new Span(0, 2);
        span22 = new Span(2, 10);
        span33 = new Span(12, 10);

        span111 = new Span(5, 10);
        span222 = new Span(15, 5);
        span333 = new Span(20, 10);

        alternate1 = new SpanList();
        alternate1.add(span3);
        alternate1.add(span2);
        alternate1.add(span1);

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

        alternate3 = new SpanList();
        alternate3.add(span111);
        alternate3.add(span222);

        root.add(span333);

        tree.annotate(span1, at1);
        tree.annotate(span2, at2);
        tree.annotate(span3, at3);

        tree.annotate(span11, at1);
        tree.annotate(span22, at2);
        tree.annotate(span33, at3);

        tree.annotate(span111, at1);
        tree.annotate(span222, at2);
        tree.annotate(span333, at3);

        alternate1.add(alternate3);

        root.add(alternate1);
        root.add(alternate2);
    }
@author <a href="mailto:mpraveen@yahoo-inc.com">Praveen Mohan</a>

This test covers all possible scenarios in a SpanList.
document/src/test/java/com/yahoo/document/annotation/SpanListAdvTestCase.java