@Test
    void testVariantInheritanceOverridesBaseInheritanceComplex() {
        QueryProfile defaultQP = new QueryProfile("default");
        defaultQP.set("model.defaultIndex", "title", null);

        QueryProfile root = new QueryProfile("root");
        root.addInherited(defaultQP);
        root.set("model.defaultIndex", "default", null);

        QueryProfile querybest = new QueryProfile("querybest");
        querybest.set("defaultIndex", "title", null);
        querybest.set("queryString", "best", null);

        QueryProfile multi = new QueryProfile("multi");
        multi.setDimensions(new String[]{"x"});
        multi.addInherited(defaultQP);
        multi.set("model", querybest, null);
        multi.addInherited(root, new String[]{"x1"});
        multi.set("model.queryString", "love", new String[]{"x1"}, null);

        // Rumtimize
        defaultQP.freeze();
        root.freeze();
        querybest.freeze();
        multi.freeze();
        Properties runtime = new QueryProfileProperties(multi.compile(null));

        assertEquals("default", runtime.get("model.defaultIndex", toMap("x=x1")));
        assertEquals("love", runtime.get("model.queryString", toMap("x=x1")));
    }
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