@Test
    void testDefaultIndexAlias() {
        SearchDefinition test = new SearchDefinition("test");
        Index year = new Index("year");
        year.setNumerical(true);
        year.addAlias("yearalias");
        test.addIndex(year);
        test.addAlias("yearalias", "year");
        IndexModel indexModel = new IndexModel(test);

        {
            Query q = new Query("?default-index=year&type=all");
            q.getModel().setExecution(new Execution(Execution.Context.createContextStub(new IndexFacts(indexModel))));
            q.getModel().setQueryString("2000");
            assertEquals("select * from sources * where year = 2000", q.yqlRepresentation());
        }

        {
            Query q = new Query("?default-index=yearalias&type=all");
            q.getModel().setExecution(new Execution(Execution.Context.createContextStub(new IndexFacts(indexModel))));
            q.getModel().setQueryString("2000");
            assertEquals("select * from sources * where year = 2000", q.yqlRepresentation());
        }
    }
Select is special handled due to the strange idea to also use it to contain subproperties with JSON.
container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java