@Test
    void testRangeSearchHitPopulationOrdering() {
        assertParse("{ \"range\" : { \"children\":[ \"foo\", { \">=\" : 0, \"<=\" : 1 }], \"attributes\" : {\"hitLimit\": 38 ,\"ascending\": true} } }", "foo:[0;1;38]");
        assertParse("{ \"range\" : { \"children\":[ \"foo\", { \">=\" : 0, \"<=\" : 1 }], \"attributes\" : {\"hitLimit\": 38 ,\"ascending\": false} } }", "foo:[0;1;-38]");
        assertParse("{ \"range\" : { \"children\":[ \"foo\", { \">=\" : 0, \"<=\" : 1 }], \"attributes\" : {\"hitLimit\": 38 ,\"descending\": true} } }", "foo:[0;1;-38]");
        assertParse("{ \"range\" : { \"children\":[ \"foo\", { \">=\" : 0, \"<=\" : 1 }], \"attributes\" : {\"hitLimit\": 38 ,\"descending\": false} } }", "foo:[0;1;38]");

        boolean gotExceptionFromParse = false;
        try {
            parseWhere("{ \"range\" : { \"children\":[ \"foo\", { \">=\" : 0, \"<=\" : 1 }], \"attributes\" : {\"hitLimit\": 38, \"ascending\": true, \"descending\": false} } }");
        } catch (IllegalArgumentException e) {
            assertTrue(e.getCause().getMessage().contains("both ascending and descending ordering set"),
                    "Expected information about abuse of settings.");
            gotExceptionFromParse = true;
        }
        assertTrue(gotExceptionFromParse);
    }
Tests Query.Select

@author henrhoi
@author bratseth
container-search/src/test/java/com/yahoo/select/SelectTestCase.java