public Item assertParsed(String parsed, String toParse, String filter, Query.Type mode,
                             Language language, Linguistics linguistics) {
        Item root = parseQuery(toParse, filter, language, mode, linguistics);
        if (parsed == null) {
            assertInstanceOf(NullItem.class, root, "root is " + root);
        } else {
            assertNotNull(root, "Got null from parsing " + toParse);
            assertEquals(parsed, root.toString(), "Parse of '" + toParse + "'");
        }
        return root;
    }
Asserts that the canonical representation of the second string when parsed
is the first string

@return the produced root
container-search/src/test/java/com/yahoo/prelude/query/parser/test/ParsingTester.java