@Test
    public void testIndexKeys() throws Exception {
        SpanTree tree = new SpanTree("something");
        assertTrue(tree.getCurrentIndexes().isEmpty());

        tree.createIndex(SpanTree.IndexKey.SPAN_NODE);
        assertEquals(1, tree.getCurrentIndexes().size());
        assertEquals(SpanTree.IndexKey.SPAN_NODE, tree.getCurrentIndexes().iterator().next());

        tree.clearIndexes();
        assertTrue(tree.getCurrentIndexes().isEmpty());

        tree.createIndex(SpanTree.IndexKey.ANNOTATION_TYPE);
        assertEquals(1, tree.getCurrentIndexes().size());
        assertEquals(SpanTree.IndexKey.ANNOTATION_TYPE, tree.getCurrentIndexes().iterator().next());

        tree.clearIndexes();
        assertTrue(tree.getCurrentIndexes().isEmpty());
    }
@author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
document/src/test/java/com/yahoo/document/annotation/IndexKeySpanTreeTestCase.java