@Test
    void testRankProperties() {
        final double delta = 0.000000001;
        Execution exc = newExecution(new GroupingExecutor());
        {
            Query query = new Query("?query=foo");
            exc.search(query);
        }
        {
            Query query = new Query("?query=foo&rankfeature.fieldMatch(foo)=2");
            assertEquals(2, query.getRanking().getFeatures().getDouble("fieldMatch(foo)").getAsDouble(), delta);
            exc.search(query);
            assertEquals(2.0, query.getRanking().getFeatures().getDouble("fieldMatch(foo)").getAsDouble(), delta);
        }
        {
            Query query = new Query("?query=foo&rankfeature.query(now)=4");
            assertEquals(4, query.getRanking().getFeatures().getDouble("query(now)").getAsDouble(), delta);
            exc.search(query);
            assertEquals("4.0", query.getRanking().getProperties().get("now").get(0));
        }
        {
            Query query = new Query("?query=foo&rankfeature.$bar=8");
            assertEquals(8, query.getRanking().getFeatures().getDouble("$bar").getAsDouble(), delta);
            exc.search(query);
            assertEquals("8.0", query.getRanking().getProperties().get("bar").get(0));
        }
        {
            Query query = new Query("?query=foo&rankproperty.bar=8");
            assertEquals("8", query.getRanking().getProperties().get("bar").get(0));
            exc.search(query);
            assertEquals("8", query.getRanking().getProperties().get("bar").get(0));
        }
        {
            Query query = new Query("?query=foo&rankfeature.fieldMatch(foo)=2&rankfeature.query(now)=4&rankproperty.bar=8");
            assertEquals(2, query.getRanking().getFeatures().getDouble("fieldMatch(foo)").getAsDouble(), delta);
            assertEquals(4, query.getRanking().getFeatures().getDouble("query(now)").getAsDouble(), delta);
            assertEquals("8", query.getRanking().getProperties().get("bar").get(0));
            exc.search(query);
            assertEquals(2, query.getRanking().getFeatures().getDouble("fieldMatch(foo)").getAsDouble(), delta);
            assertEquals("4.0", query.getRanking().getProperties().get("now").get(0));
            assertEquals("8", query.getRanking().getProperties().get("bar").get(0));
        }
    }
Tests the internal rewriting of rank properties which happens in the query.prepare() call
(triggered by the exc.search call in the below).
container-search/src/test/java/com/yahoo/search/grouping/vespa/GroupingExecutorTestCase.java