@Test (expected = IllegalStateException.class)
    public void assertNeedForCleanup() {
        populateSpanTree();
        root.remove(span3);
        Iterator<Annotation> iter =tree.iterator();
        while (iter.hasNext()) {
            SpanNode sn = iter.next().getSpanNode();
        }
    }
@author <a href="mailto:mpraveen@yahoo-inc.com">Praveen Mohan</a>

This test covers all possible scenarios in SpanTree.
document/src/test/java/com/yahoo/document/annotation/SpanTreeAdvTest.java