@Test
    void testDefaultPosition() {
        Index a = new Index("a");
        assertFalse(a.isDefaultPosition());
        a.addCommand("any");
        assertFalse(a.isDefaultPosition());
        a.addCommand("default-position");
        assertTrue(a.isDefaultPosition());

        SearchDefinition sd = new SearchDefinition("sd");
        sd.addCommand("b", "any");
        assertNull(sd.getDefaultPosition());
        sd.addCommand("c", "default-position");
        assertEquals(sd.getDefaultPosition(), "c");

        SearchDefinition sd2 = new SearchDefinition("sd2");
        sd2.addIndex(new Index("b").addCommand("any"));
        assertNull(sd2.getDefaultPosition());
        sd2.addIndex(a);
        assertEquals(sd2.getDefaultPosition(), "a");

        IndexFacts indexFacts = createIndexFacts(List.of(sd, sd2));
        assertEquals(indexFacts.getDefaultPosition(null), "a");
        assertEquals(indexFacts.getDefaultPosition("sd"), "c");
    }
Tests using synthetic index names for IndexFacts class.

@author Steinar Knutsen
container-search/src/test/java/com/yahoo/prelude/test/IndexFactsTestCase.java