private Result searchWord(
            String word,
            Optional<Language> explicitLanguage,
            Optional<Language> implicitLanguage,
            Optional<DocumentFrequency> documentFrequency,
            Optional<Double> significance
    ) {
        var query = new Query();
        explicitLanguage.ifPresent(query.getModel()::setLanguage);
        query.getRanking().setProfile("significance-ranking");

        var queryRoot = new AndItem();
        var queryWord = new WordItem(word, true);

        documentFrequency.ifPresent(queryWord::setDocumentFrequency);
        significance.ifPresent(queryWord::setSignificance);

        queryRoot.addItem(queryWord);
        query.getModel().getQueryTree().setRoot(queryRoot);

        var context = Execution.Context.createContextStub();
        implicitLanguage.ifPresent(language -> context.setLinguistics(new MockLinguistics(language)));
        var execution = new Execution(new Chain<>(searcher), context);
        return execution.search(query);
    }
Tests significance term in the search chain.

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