@Test
    void queryTreeExceedsAllowedSize() {
        Query query = new Query();
        QueryTree tree = query.getModel().getQueryTree();
        tree.setRoot(new WordItem("A"));
        tree.and(new WordItem("B"));

        assertNull(QueryCanonicalizer.canonicalize(query));
        query.properties().set("maxQueryItems", 2);
        assertEquals("Query tree exceeds allowed item count. Configured limit: 2 - Item count: 3", QueryCanonicalizer.canonicalize(query));
    }
Tests that significance is transferred to rank properties by preparing the query
(which strictly is an implementation detail which we should rather hide).
container-search/src/test/java/com/yahoo/prelude/query/test/QueryCanonicalizerTestCase.java