@Test
    void testGetSubObjects() {
        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");
        mor.addInherited(mormor);
        mor.addInherited(morfar);
        far.addInherited(farfar);
        barn.addInherited(mor);
        barn.addInherited(far);
        mormor.set("a.mormor", "a.mormor", null);
        barn.set("a.barn", "a.barn", null);
        mor.set("b.mor", "b.mor", null);
        far.set("b.far", "b.far", null);
        far.set("a.far", "a.far", null);
        CompiledQueryProfile cbarn = barn.compile(null);

        assertSameObjects(cbarn, "a", List.of("mormor", "far", "barn"));

        assertEquals("b.mor", cbarn.get("b.mor"));
        assertEquals("b.far", cbarn.get("b.far"));
    }
Tests cloning, with wrappers used in production in place
container-search/src/test/java/com/yahoo/search/query/profile/test/QueryProfileTestCase.java