@Test
    void testVariantReference() {
        QueryProfileRegistry registry = new QueryProfileRegistry();

        QueryProfile parent = new QueryProfile("parent");
        parent.set("b", 48, registry);
        registry.register(parent);

        QueryProfile referenced = new QueryProfile("referenced");
        referenced.addInherited(parent);
        referenced.setDimensions(new String[]{"d2", "d3"});
        registry.register(referenced);

        QueryProfile base = new QueryProfile("base");
        base.setDimensions(new String[]{"d1", "d2", "d3"});
        base.set("a", referenced, new String[]{  null, null, "d3-val"}, registry);
        base.set("a.b", 1, new String[]{  null, null, "d3-val"}, registry);
        QueryProfileVariant aVariants = base.getVariants().getVariants().get(0);
        QueryProfile a = (QueryProfile) aVariants.values().get("a");
        assertEquals("[d1, d2, d3]", a.getDimensions().toString());
        registry.register(base);

        QueryProfiles profiles = new QueryProfiles(registry, new TestableDeployLogger());
        QueryProfileRegistry registryFromConfig = QueryProfileConfigurer.createFromConfig(profiles.getConfig());
        var directValue = registry.findQueryProfile("base")
                .get("a.b",
                        new String[]{"default", null, "d3-val"});
        var throughConfigValue = registryFromConfig.findQueryProfile("base")
                .get("a.b",
                        new String[]{"default", null, "d3-val"});
        assertEquals(directValue.toString(), throughConfigValue.toString());
    }
Tests generation of config from query profiles (XML reading is tested elsewhere)

@author bratseth
config-model/src/test/java/com/yahoo/vespa/model/container/search/test/QueryProfilesTestCase.java