@Test(expected = IllegalArgumentException.class)
    public void testSwitchIndexes2()  {
        SpanTree tree = new SpanTree("something");
        assertTrue(tree.getCurrentIndexes().isEmpty());
        tree.createIndex(SpanTree.IndexKey.ANNOTATION_TYPE);
        tree.createIndex(SpanTree.IndexKey.SPAN_NODE);
    }
@author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
document/src/test/java/com/yahoo/document/annotation/IndexKeySpanTreeTestCase.java