@Test
    void testTypedAssignmentOfQueryProfileReferencesStrictThroughQuery() {
        QueryProfile profile = new QueryProfile("test");
        profile.setType(testtypeStrict);

        QueryProfile newUser = new QueryProfile("newUser");
        newUser.setType(userStrict);
        newUser.set("myUserString", "newUserValue1", registry);
        newUser.set("myUserInteger", 845, registry);

        registry.register(profile);
        registry.register(newUser);

        CompiledQueryProfileRegistry cRegistry = registry.compile();

        Query query = new Query(HttpRequest.createTestRequest("?myUserQueryProfile=newUser", com.yahoo.jdisc.http.HttpRequest.Method.GET), cRegistry.getComponent("test"));
        assertEquals(0, query.errors().size());

        assertEquals("newUserValue1", query.properties().get("myUserQueryProfile.myUserString"));
        assertEquals(845, query.properties().get("myUserQueryProfile.myUserInteger"));

        try {
            query.properties().set("myUserQueryProfile.someKey", "value");
            fail("Should not be allowed to set this");
        }
        catch (IllegalArgumentException e) {
            assertEquals("Could not set 'myUserQueryProfile.someKey' to 'value': 'someKey' is not declared in query profile type 'userStrict', and the type is strict",
                    Exceptions.toMessageString(e));
        }

    }
Tests overriding a subprofile as an id string through the query.
Here no user profile is set before it is assigned in the query
container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java