@Test
    void testLowercasingWordAlternatives() {
        Execution execution = new Execution(new Chain<Searcher>(new VespaLowercasingSearcher(new LowercasingConfig(
                new LowercasingConfig.Builder().transform_weighted_sets(false)))), Execution.Context.createContextStub(createIndexFacts()));

        Query q = new Query();
        WordAlternativesItem root;
        List<WordAlternativesItem.Alternative> terms = new ArrayList<>();
        terms.add(new Alternative("ABC", 1.0));
        terms.add(new Alternative("def", 1.0));
        root = new WordAlternativesItem(BAMSE, true, null, terms);
        q.getModel().getQueryTree().setRoot(root);
        Result r = execution.search(q);
        root = (WordAlternativesItem) r.getQuery().getModel().getQueryTree().getRoot();
        assertEquals(3, root.getAlternatives().size());
        assertEquals("ABC", root.getAlternatives().get(0).word);
        assertEquals(1.0d, root.getAlternatives().get(0).exactness, 1e-15d);
        assertEquals("abc", root.getAlternatives().get(1).word);
        assertEquals(.7d, root.getAlternatives().get(1).exactness, 1e-15d);
        assertEquals("def", root.getAlternatives().get(2).word);
        assertEquals(1.0d, root.getAlternatives().get(2).exactness, 1e-15d);
    }
Tests term lowercasing in the search chain.

@author Steinar Knutsen
container-search/src/test/java/com/yahoo/search/querytransform/LowercasingTestCase.java