@Test
    void testWeightedSet() {
        Query q = new Query();
        AndItem root = new AndItem();
        WeightedSetItem tmp;
        tmp = new WeightedSetItem(BAMSE);
        tmp.addToken("AbC", 3);
        root.addItem(tmp);
        tmp = new WeightedSetItem(TEDDY);
        tmp.addToken("dEf", 5);
        root.addItem(tmp);
        q.getModel().getQueryTree().setRoot(root);
        Result r = createExecution().search(q);
        root = (AndItem) r.getQuery().getModel().getQueryTree().getRoot();
        WeightedSetItem w0 = (WeightedSetItem) root.getItem(0);
        WeightedSetItem w1 = (WeightedSetItem) root.getItem(1);
        assertEquals(1, w0.getNumTokens());
        assertEquals(1, w1.getNumTokens());
        assertEquals("abc", w0.getTokens().next().getKey());
        assertEquals("dEf", w1.getTokens().next().getKey());
    }
Tests term lowercasing in the search chain.

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