@Test
    void testPatchMatchingInheritance() {
        QueryProfileType type = new QueryProfileType("type");
        QueryProfileType subType = new QueryProfileType("subType");
        subType.inherited().add(type);

        type.setMatchAsPath(true); // Supertype only

        QueryProfile a = new QueryProfile("a");
        a.setType(type);
        QueryProfile abee = new QueryProfile("a/bee");
        abee.setType(subType);
        abee.addInherited(a);
        QueryProfile abeece = new QueryProfile("a/bee/ce");
        abeece.setType(subType);
        abeece.addInherited(abee);

        QueryProfileRegistry registry = new QueryProfileRegistry();
        registry.register(a);
        registry.register(abee);
        registry.register(abeece);
        registry.freeze();

        assertNull(registry.findQueryProfile(null)); // No "default" registered
        assertEquals("a", registry.findQueryProfile("a").getId().getName());
        assertEquals("a/bee", registry.findQueryProfile("a/bee").getId().getName());
        assertEquals("a/bee/ce", registry.findQueryProfile("a/bee/ce").getId().getName());
        assertEquals("a/bee/ce", registry.findQueryProfile("a/bee/ce/dee").getId().getName());
        assertEquals("a/bee/ce", registry.findQueryProfile("a/bee/ce/dee/eee/").getId().getName());
        assertEquals("a/bee", registry.findQueryProfile("a/bee/cede").getId().getName());
        assertEquals("a", registry.findQueryProfile("a/foo/bee/cede").getId().getName());
        assertNull(registry.findQueryProfile("abee"));
    }
Check that the path matching property is inherited to subtypes
container-search/src/test/java/com/yahoo/search/query/profile/types/test/PatchMatchingTestCase.java