private static Item parseQuery(String query, String filter, Query.Type type) {
        Parser parser = ParserFactory.newInstance(type, new ParserEnvironment());
        return parser.parse(new Parsable().setQuery(query).setFilter(filter));
    }
Check copy of query trees is a deep copy
container-search/src/test/java/com/yahoo/prelude/query/test/QueryTestCase.java