@Test
    void testZoneInfoInContext() {
        QueryProfileRegistry registry = new QueryProfileRegistry();
        QueryProfile profile = new QueryProfile("test");
        profile.setDimensions(new String[]{"environment", "region", "instance"});
        profile.set("value", "default", registry);
        profile.set("value", "prod-region1-instance1",
                toMap("environment=prod", "region=region1", "instance=instance1"),
                registry);
        profile.set("value", "prod-instance2",
                toMap("environment=prod", "instance=instance2"),
                registry);
        profile.set("value", "prod-region3",
                toMap("environment=prod", "region=region3"),
                registry);
        profile.set("value", "dev",
                toMap("environment=dev"),
                registry);
        registry.register(profile);

        CompiledQueryProfileRegistry cRegistry = registry.compile();
        CompiledQueryProfile cTest = cRegistry.findQueryProfile("test");

        assertValueForZone("default", ZoneInfo.defaultInfo(), null, cTest);
        assertValueForZone("prod-region1-instance1",
                new ZoneInfo(new ApplicationId("tenant1", "application1", "instance1"),
                        new Zone(Environment.prod, "region1")),
                null,
                cTest);
        assertValueForZone("prod-instance2",
                new ZoneInfo(new ApplicationId("tenant2", "application2", "instance2"),
                        new Zone(Environment.prod, "region1")),
                null,
                cTest);
        assertValueForZone("prod-region3",
                new ZoneInfo(new ApplicationId("tenant3", "application3", "instance3"),
                        new Zone(Environment.prod, "region3")),
                null,
                cTest);
        assertValueForZone("dev",
                new ZoneInfo(new ApplicationId("tenant4", "application4", "instance4"),
                        new Zone(Environment.dev, "region4")),
                null,
                cTest);
    }
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