@BeforeEach
    public void setUp() {
        registry = new QueryProfileRegistry();

        testtype = new QueryProfileType(new ComponentId("testtype"));
        testtype.inherited().add(registry.getTypeRegistry().getComponent(new ComponentId("native")));
        emptyInheritingTesttype = new QueryProfileType(new ComponentId("emptyInheritingTesttype"));
        emptyInheritingTesttype.inherited().add(testtype);
        testtypeStrict = new QueryProfileType(new ComponentId("testtypeStrict"));
        testtypeStrict.setStrict(true);
        user = new QueryProfileType(new ComponentId("user"));
        userStrict = new QueryProfileType(new ComponentId("userStrict"));
        userStrict.setStrict(true);

        registry.getTypeRegistry().register(testtype);
        registry.getTypeRegistry().register(emptyInheritingTesttype);
        registry.getTypeRegistry().register(testtypeStrict);
        registry.getTypeRegistry().register(user);
        registry.getTypeRegistry().register(userStrict);

        addTypeFields(testtype, registry.getTypeRegistry());
        testtype.addField(new FieldDescription("myUserQueryProfile", FieldType.fromString("query-profile:user", registry.getTypeRegistry())));
        addTypeFields(testtypeStrict, registry.getTypeRegistry());
        testtypeStrict.addField(new FieldDescription("myUserQueryProfile", FieldType.fromString("query-profile:userStrict", registry.getTypeRegistry())));
        addUserFields(user, registry.getTypeRegistry());
        addUserFields(userStrict, registry.getTypeRegistry());

    }
Tests query profiles with/and types

@author bratseth
container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java