@Test
    void testSignificanceValueOnRecursiveQuery() {
        Query q = new Query();
        q.getRanking().setProfile("significance-ranking");
        AndItem root = new AndItem();
        WordItem child1 = new WordItem("hello", true);

        AndItem child2 = new AndItem();
        WordItem child2_1 = new WordItem("test", true);

        AndItem child3 = new AndItem();
        AndItem child3_1 = new AndItem();
        WordItem child3_1_1 = new WordItem("usa", true);

        root.addItem(child1);
        root.addItem(child2);
        root.addItem(child3);

        child2.addItem(child2_1);
        child3.addItem(child3_1);
        child3_1.addItem(child3_1_1);

        q.getModel().getQueryTree().setRoot(root);

        var helloDocumentFrequency = getModelDocumentFrequencyWithEnglish("hello");
        var testDocumentFrequency = getModelDocumentFrequencyWithEnglish("test");

        Result r = createExecution(searcher).search(q);

        root = (AndItem) r.getQuery().getModel().getQueryTree().getRoot();
        WordItem w0 = (WordItem) root.getItem(0);
        WordItem w1 = (WordItem) ((AndItem) root.getItem(1)).getItem(0);
        WordItem w3 = (WordItem) ((AndItem) ((AndItem) root.getItem(2)).getItem(0)).getItem(0);

        assertEquals(helloDocumentFrequency, w0.getDocumentFrequency());
        assertEquals(testDocumentFrequency, w1.getDocumentFrequency());
        assertEquals(Optional.of(new DocumentFrequency(2, 16)), w3.getDocumentFrequency());

    }
Tests significance term in the search chain.

@author MariusArhaug
container-search/src/test/java/com/yahoo/search/significance/test/SignificanceSearcherTest.java