@Test
    void testTensorTypes() {
        CompiledQueryProfileRegistry registry = new QueryProfileXMLReader().read("src/test/java/com/yahoo/search/query/profile/config/test/tensortypes").compile();

        QueryProfileType type1 = registry.getTypeRegistry().getComponent("type1");
        assertEquals(TensorType.fromSpec("tensor<float>(x[1])"),
                type1.getFieldType(CompoundName.from("ranking.features.query(tensor_1)")).asTensorType());
        assertNull(type1.getFieldType(CompoundName.from("ranking.features.query(tensor_2)")));
        assertNull(type1.getFieldType(CompoundName.from("ranking.features.query(tensor_3)")));
        assertEquals(TensorType.fromSpec("tensor(key{})"),
                type1.getFieldType(CompoundName.from("ranking.features.query(tensor_4)")).asTensorType());

        QueryProfileType type2 = registry.getTypeRegistry().getComponent("type2");
        assertNull(type2.getFieldType(CompoundName.from("ranking.features.query(tensor_1)")));
        assertEquals(TensorType.fromSpec("tensor<float>(x[2])"),
                type2.getFieldType(CompoundName.from("ranking.features.query(tensor_2)")).asTensorType());
        assertEquals(TensorType.fromSpec("tensor<float>(x[3])"),
                type2.getFieldType(CompoundName.from("ranking.features.query(tensor_3)")).asTensorType());

        Query queryProfile1 = new Query.Builder().setQueryProfile(registry.getComponent("profile1"))
                .setRequest("?query=test&ranking.features.query(tensor_1)=[1.200]")
                .build();
        assertEquals(Tensor.from("tensor<float>(x[1]):[1.2]"),
                queryProfile1.properties().get("ranking.features.query(tensor_1)"),
                "tensor_1 received as a tensor tensor");
        assertEquals(Tensor.from("tensor(key{}):{pre_key1_post:1.0}"),
                queryProfile1.properties().get("ranking.features.query(tensor_4)"),
                "tensor_4 contained in the profile is a tensor");

        Query queryProfile2 = new Query.Builder().setQueryProfile(registry.getComponent("profile2"))
                .setEmbedder(new MockEmbedder("text-to-embed",
                        Tensor.from("tensor(x[3]):[1, 2, 3]")))
                .setRequest("?query=test&ranking.features.query(tensor_1)=[1.200]")
                .build();
        assertEquals("[1.200]",
                queryProfile2.properties().get("ranking.features.query(tensor_1)"),
                "tensor_1 received as a string as it is not in type2");
        //assertEquals(Tensor.from("tensor(x[3]):[1, 2, 3]"),
        //             queryProfile2.properties().get("ranking.features.query(tensor_3)"));
    }
Tests a subset of the configuration in the system test of this
container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java