@Test
    public void assertIsLeafNode() {
        populateSpanTree();
        assertFalse(root.isLeafNode());
        assertFalse(alternate1.isLeafNode());
        assertFalse(branch.isLeafNode());
        assertTrue(span11.isLeafNode());
        assertTrue(span22.isLeafNode());
        assertFalse(alternate2.isLeafNode());
        assertTrue(span33.isLeafNode());
        assertFalse(branch1.isLeafNode());
        assertTrue(span111.isLeafNode());
        assertTrue(span222.isLeafNode());
        assertTrue(span333.isLeafNode());
    }
@author <a href="mailto:mpraveen@yahoo-inc.com">Praveen Mohan</a>

This test covers all possible scenarios in SpanNode.
document/src/test/java/com/yahoo/document/annotation/SpanNodeAdvTestCase.java