@Test
    void testVariantInheritanceWithTwoLevelCompoundReferencesVariantAtFirstLevel() {
        QueryProfile test = new QueryProfile("test");
        test.setDimensions(new String[]{"x"});
        test.set("o.a.b", "default-a.b", null);

        QueryProfile ac = new QueryProfile("ac");
        ac.set("o.a.c", "referenced-a.c", null);
        test.addInherited(ac, new String[]{"x1"});
        test.set("o.a.b", "x1-a.b", new String[]{"x1"}, null);

        CompiledQueryProfile ctest = test.compile(null);
        assertEquals("default-a.b", ctest.get("o.a.b"), "Basic functionality");
        assertEquals("referenced-a.c", ctest.get("o.a.c", toMap("x=x1")), "Inherited variance reference works");
        assertEquals("x1-a.b", ctest.get("o.a.b", toMap("x=x1")), "Inherited variance reference overriding works");
    }
Tests referencing a variant which modifies the dimension set,
and also setting a value within that variants subspace.
container-search/src/test/java/com/yahoo/search/query/profile/test/QueryProfileVariantsTestCase.java