@Test
    void testQueryProfileNestedReferencing() {
        addChained(new MockSearcher(), "mySource1");
        addChained(new MockSearcher(), "mySource2");
        Chain<Searcher> mainChain = new Chain<>("default", createFederationSearcher());

        QueryProfile defaultProfile = new QueryProfile("default");
        defaultProfile.set("source.mySource1.hits", "%{hits}", null);
        defaultProfile.freeze();
        Query q = new Query(QueryTestCase.httpEncode("?query=test"), defaultProfile.compile(null));

        Result result = new Execution(mainChain, Execution.Context.createContextStub(chainRegistry)).search(q);
        assertNull(result.hits().getError());
        assertEquals("source:mySource1", result.hits().get(0).getId().stringValue());
        assertEquals("source:mySource2", result.hits().get(1).getId().stringValue());
    }
Test for federation searcher. The searcher is also tested in
com.yahoo.prelude.searcher.test.BlendingSearcherTestCase.

@author Arne Bergene Fossaa
container-search/src/test/java/com/yahoo/search/federation/FederationSearcherTestCase.java