@Test
    void testQueryProfileSourceAccess() {
        QueryProfile profile = new QueryProfile("myProfile");
        profile.set("myField", "Profile: %{queryProfile}", null);
        Query query = new Query(QueryTestCase.httpEncode("/search?queryProfile=myProfile"), profile.compile(null));

        String source = query.properties().getInstance(com.yahoo.search.query.profile.QueryProfileProperties.class).getQueryProfile().listValuesWithSources(CompoundName.empty, query.getHttpRequest().propertyMap(), query.properties()).get("myField").source();
        assertEquals("myProfile", source);
    }
Select is special handled due to the strange idea to also use it to contain subproperties with JSON.
container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java