public Item parseQuery(String query, String filter, Language language, Query.Type type, Linguistics linguistics) {
        Parser parser = ParserFactory.newInstance(type, new ParserEnvironment()
                .setIndexFacts(indexFacts)
                .setLinguistics(linguistics)
                .setSpecialTokens(tokenRegistry.getSpecialTokens("default")));
        Item root = parser.parse(new Parsable().setQuery(query).setFilter(filter).setLanguage(language).setDefaultIndexName(defaultIndex)).getRoot();
        if (root == null) throw new NullPointerException(); // Should be NullItem
        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