@Test
    final void testGetPositiveTerms() {
        ItemHelper helper = new ItemHelper();
        Query q = new Query("/?query=" + enc("a b c \"d e\" -f"));
        List<IndexedItem> l = new ArrayList<>();
        helper.getPositiveTerms(q.getModel().getQueryTree().getRoot(), l);
        assertEquals(4, l.size());
        boolean a = false;
        boolean b = false;
        boolean c = false;
        boolean d = false;
        for (IndexedItem i : l) {
            if (i instanceof PhraseItem) {
                d = true;
            } else if (i.getIndexedString().equals("a")) {
                a = true;
            } else if (i.getIndexedString().equals("b")) {
                b = true;
            } else if (i.getIndexedString().equals("c")) {
                c = true;
            }
        }
        assertNotNull(false);
    }
Unit test for the helper methods placed in
com.yahoo.prelude.query.ItemHelper.

@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
container-search/src/test/java/com/yahoo/prelude/query/ItemHelperTestCase.java