@Test (expected = IndexOutOfBoundsException.class)
    public void assertInvalidAdd() {
        SpanNode newNode = new Span(10, 10);
        branch.add(branch.getNumSubTrees(), newNode);
    }
@author <a href="mailto:mpraveen@yahoo-inc.com">Praveen Mohan</a>

This test covers all possible scenarios in AlternateSpanList.
If you really want to debug, just turn on the debug flag to true.
document/src/test/java/com/yahoo/document/annotation/AlternateSpanListAdvTestCase.java