@Test
    public void assertTree() {
        final AlternateSpanList branch =  (AlternateSpanList)((SpanList)tree.getRoot()).children().get(0);
        assertEquals(0, branch.getFrom());
        assertEquals(6, branch.getTo());
        assertEquals(10, branch.getFrom(1));
        assertEquals(16, branch.getTo(1));
        branch.sortSubTreesByProbability();

        assertEquals(10, branch.getFrom());
        assertEquals(16, branch.getTo());
        assertEquals(0, branch.getFrom(1));
        assertEquals(6, branch.getTo(1));
    }
@author <a href="mailto:mpraveen@yahoo-inc.com">Praveen Mohan</a>

This test checks if sub-trees are sorted appropriately by probability
within an alternate span list and getFrom() and getTo() are updated properly
when the trees are sorted.
document/src/test/java/com/yahoo/document/annotation/Bug4164299TestCase.java