private void assertNotPermitted(QueryProfile profile,String name,Object value) {
        String localName = CompoundName.from(name).last();
        try {
            profile.set(name, value, registry);
            fail("Should fail setting " + name + " to " + value);
        }
        catch (IllegalArgumentException e) {
            assertTrue(Exceptions.toMessageString(e).startsWith("Could not set '" + name + "' to '" + value + "': '" + localName + "' is not declared"));
        }
    }
Tests overriding a subprofile as an id string through the query.
Here, no user profile is set before it is assigned in the query
The whole thing is accessed through a two levels of nontyped top-level profiles
container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java