@Test
    void testTensorRankFeatureSetProgrammaticallyWithWrongType() {
        QueryProfile profile = new QueryProfile("test");
        profile.setType(testtype);
        registry.register(profile);

        CompiledQueryProfileRegistry cRegistry = registry.compile();
        String tensorString = "tensor(x[3]):[0.1, 0.2, 0.3]";
        Query query = new Query(HttpRequest.createTestRequest("?", com.yahoo.jdisc.http.HttpRequest.Method.GET),
                cRegistry.getComponent("test"));
        try {
            query.getRanking().getFeatures().put("query(myTensor1)", Tensor.from(tensorString));
            fail("Expected exception");
        }
        catch (IllegalArgumentException e) {
            assertEquals("Could not set 'ranking.features.query(myTensor1)' to 'tensor(x[3]):[0.1, 0.2, 0.3]': " +
                    "Require a tensor of type tensor(a{},b{})",
                    Exceptions.toMessageString(e));
        }
        try {
            query.properties().set("ranking.features.query(myTensor1)", Tensor.from(tensorString));
            fail("Expected exception");
        }
        catch (IllegalArgumentException e) {
            assertEquals("Could not set 'ranking.features.query(myTensor1)' to 'tensor(x[3]):[0.1, 0.2, 0.3]': " +
                    "Require a tensor of type tensor(a{},b{})",
                    Exceptions.toMessageString(e));
        }
    }
Tests overriding a subprofile as an id string through the query.
Here no user profile is set before it is assigned in the query
container-search/src/test/java/com/yahoo/search/query/profile/types/test/QueryProfileTypeTestCase.java