@Test
    void testTypedAssignmentOfQueryProfileReferencesNonStrict() {
        QueryProfile profile = new QueryProfile("test");
        profile.setType(testtype);

        QueryProfile map1 = new QueryProfile("myMap1");
        map1.set("key1", "value1", registry);

        QueryProfile map2 = new QueryProfile("myMap2");
        map2.set("key2", "value2", registry);

        QueryProfile myUser = new QueryProfile("myUser");
        myUser.setType(user);
        myUser.set("myUserString", "userValue1", registry);
        myUser.set("myUserInteger", 442, registry);

        registry.register(profile);
        registry.register(map1);
        registry.register(map2);
        registry.register(myUser);

        assertWrongType(profile, "reference to a query profile", "myQueryProfile", "aString");
        registry.register(map1);
        profile.set("myQueryProfile", "myMap1", registry);
        registry.register(map2);
        profile.set("someMap", "myMap2", registry); // NOTICE: Will set as a string because we cannot know this is a reference
        assertWrongType(profile, "reference to a query profile of type 'user'", "myUserQueryProfile", "myMap1");
        registry.register(myUser);
        profile.set("myUserQueryProfile", "myUser", registry);

        CompiledQueryProfileRegistry cRegistry = registry.compile();
        CompiledQueryProfile cprofile = cRegistry.getComponent("test");

        assertEquals("value1", cprofile.get("myQueryProfile.key1"));
        assertEquals("myMap2", cprofile.get("someMap"));
        assertNull(cprofile.get("someMap.key2"), "Asking for an value which cannot be completely resolved returns null");
        assertEquals("userValue1", cprofile.get("myUserQueryProfile.myUserString"));
        assertEquals(442, cprofile.get("myUserQueryProfile.myUserInteger"));
    }
Tests assigning a subprofile as an id string
container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java