@Test
    void testMandatoryNestedInMaps() {
        Fixture1 fixture = new Fixture1();

        QueryProfile topMap = new QueryProfile("topMap");
        fixture.registry.register(topMap);

        QueryProfile subMap = new QueryProfile("topSubMap");
        topMap.set("subMap", subMap, fixture.registry);
        fixture.registry.register(subMap);

        QueryProfile test = new QueryProfile("test");
        test.setType(fixture.type);
        subMap.set("test", test, fixture.registry);
        fixture.registry.register(test);

        QueryProfile myUser = new QueryProfile("user");
        myUser.setType(fixture.user);
        myUser.set("myUserInteger", 1, fixture.registry);
        test.set("myUserQueryProfile", myUser, fixture.registry);
        fixture.registry.register(myUser);


        CompiledQueryProfileRegistry cRegistry = fixture.registry.compile();

        // Underspecified request 1
        assertError("Incomplete query: Parameter 'subMap.test.myString' is mandatory in query profile 'topMap' but is not set",
                new Query(HttpRequest.createTestRequest("", Method.GET), cRegistry.getComponent("topMap")));

        // Underspecified request 2
        assertError("Incomplete query: Parameter 'subMap.test.myUserQueryProfile.myUserString' is mandatory in query profile 'topMap' but is not set",
                new Query(HttpRequest.createTestRequest("?subMap.test.myString=aString", Method.GET), cRegistry.getComponent("topMap")));

        // Fully specified request
        assertError(null, new Query(HttpRequest.createTestRequest("?subMap.test.myString=aString&subMap.test.myUserQueryProfile.myUserString=userString", Method.GET), cRegistry.getComponent("topMap")));
    }
Same as above except the whole thing is nested in maps
container-search/src/test/java/com/yahoo/search/query/profile/types/test/MandatoryTestCase.java