@Test
    void testInheritedVariants() {
        QueryProfile parent = new QueryProfile("parent");
        parent.setDimensions(new String[]{"parentDim"});
        parent.set("property", "defaultValue", null);
        parent.set("property", "variantValue", new String[]{"V2"}, null);

        QueryProfile child = new QueryProfile("child");
        child.addInherited(parent);
        child.setDimensions(new String[]{"childDim"});
        child.set("otherProperty", "otherPropertyValue", new String[]{"V1"}, null);

        CompiledQueryProfile cchild = child.compile(null);
        assertEquals("defaultValue", new Query("?query=test",               cchild).properties().get("property"));
        assertEquals("variantValue", new Query("?parentDim=V2",             cchild).properties().get("property"));
        assertEquals("defaultValue", new Query("?childDim=V1",              cchild).properties().get("property"));
        assertEquals("variantValue", new Query("?parentDim=V2&childDim=V1", cchild).properties().get("property"));
        assertEquals("variantValue", new Query("?parentDim=V2&childDim=NO", cchild).properties().get("property"));
    }
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