@Test
    public void assertGetParent() {
        populateSpanTree();
        assertEquals(root, span1.getParent());
        assertEquals(root, span2.getParent());
        assertEquals(root, span3.getParent());
        assertEquals(root, alternate1.getParent());
        assertEquals(alternate1, span11.getParent());
        assertEquals(alternate1, branch.getParent());
        assertEquals(branch, span22.getParent());
        assertEquals(branch, alternate2.getParent());
        assertEquals(alternate2, span33.getParent());
        assertEquals(alternate2, span111.getParent());
        assertEquals(branch1, span333.getParent());
        assertEquals(alternate2, branch1.getParent());
        assertEquals(alternate1, span11.getParent());
    }
@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