@Test
    void testConnexityAndCloning() {
        Query q = new Query("?query=a%20b");
        CompositeItem root = (CompositeItem) q.getModel().getQueryTree().getRoot();
        ((WordItem) root.getItem(0)).setConnectivity(root.getItem(1), java.lang.Math.E);
        q = q.clone();

        assertNull(q.getRanking().getProperties().get("vespa.term.1.connexity"), "Not prepared yet");
        q.prepare();
        assertEquals("2", q.getRanking().getProperties().get("vespa.term.1.connexity").get(0));
        assertEquals("2.718281828459045", q.getRanking().getProperties().get("vespa.term.1.connexity").get(1));
        q = q.clone(); // The clone stays prepared
        assertEquals("2", q.getRanking().getProperties().get("vespa.term.1.connexity").get(0));
        assertEquals("2.718281828459045", q.getRanking().getProperties().get("vespa.term.1.connexity").get(1));
    }
Tests that connexity is preserved by cloning and 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