@Test
    void testBasicValidation() {
        assertNotNull(quoteAndTransform("+a -b +c"));
        assertNotNull(quoteAndTransform("+a"));
        assertNotNull(quoteAndTransform(null));
        assertEquals("[ASCENDING:[rank]]", quoteAndTransform("+[rank]"));
        assertEquals("[ASCENDING:[docid]]", quoteAndTransform("+[docid]"));
        assertEquals("[ASCENDING:[rank]]", quoteAndTransform("+[relevancy]"));
        assertEquals("[ASCENDING:[rank]]", quoteAndTransform("+[relevance]"));
    }
Check sorting validation behaves OK.

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