@Test
    void testListProperties() {
        QueryProfile barn = new QueryProfile("barn");
        QueryProfile mor = new QueryProfile("mor");
        QueryProfile far = new QueryProfile("far");
        QueryProfile mormor = new QueryProfile("mormor");
        QueryProfile morfar = new QueryProfile("morfar");
        QueryProfile farfar = new QueryProfile("farfar");
        barn.addInherited(mor);
        barn.addInherited(far);
        mor.addInherited(mormor);
        mor.addInherited(morfar);
        far.addInherited(farfar);

        morfar.set("a", "morfar-a", null);
        morfar.set("model.b", "morfar-model.b", null);
        mormor.set("a", "mormor-a", null);
        mormor.set("model.b", "mormor-model.b", null);
        farfar.set("a", "farfar-a", null);
        mor.set("a", "mor-a", null);
        far.set("a", "far-a", null);
        barn.set("a", "barn-a", null);
        mormor.set("b", "mormor-b", null);
        far.set("b", "far-b", null);
        mor.set("c", "mor-c", null);
        far.set("c", "far-c", null);

        CompiledQueryProfile cbarn = barn.compile(null);

        QueryProfileProperties properties = new QueryProfileProperties(cbarn);

        assertEquals("barn-a", cbarn.get("a"));
        assertEquals("mormor-b", cbarn.get("b"));

        Map<String, Object> rootMap = properties.listProperties();
        assertEquals("barn-a", rootMap.get("a"));
        assertEquals("mormor-b", rootMap.get("b"));
        assertEquals("mor-c", rootMap.get("c"));

        Map<String, Object> modelMap = properties.listProperties("model");
        assertEquals("mormor-model.b", modelMap.get("b"));

        QueryProfile annetBarn = new QueryProfile("annetBarn");
        annetBarn.set("venn", barn, (QueryProfileRegistry) null);
        CompiledQueryProfile cannetBarn = annetBarn.compile(null);

        Map<String, Object> annetBarnMap = new QueryProfileProperties(cannetBarn).listProperties();
        assertEquals("barn-a", annetBarnMap.get("venn.a"));
        assertEquals("mormor-b", annetBarnMap.get("venn.b"));
        assertEquals("mor-c", annetBarnMap.get("venn.c"));
        assertEquals("mormor-model.b", annetBarnMap.get("venn.model.b"));
    }
Tests cloning, with wrappers used in production in place
container-search/src/test/java/com/yahoo/search/query/profile/test/QueryProfileTestCase.java