@Test
    void testRankProfileValidation() {
        IndexedBackend fastSearcher = new IndexedBackend(CLUSTER_PARAMS,
                MockDispatcher.create(List.of(new Node(CLUSTER, 0, "host0", 0))));
        assertFalse(searchError("?query=q", fastSearcher).contains("does not contain requested rank profile"));
        assertFalse(searchError("?query=q&ranking.profile=default", fastSearcher).contains("does not contain requested rank profile"));
        assertTrue(searchError("?query=q&ranking.profile=nosuch", fastSearcher).contains("does not contain requested rank profile"));
    }
Tests the Fast searcher

@author bratseth
container-search/src/test/java/com/yahoo/prelude/fastsearch/IndexedBackendTestCase.java