@Before
    public void setUp() {
        DocumentType parent = new DocumentType("parent");
        parent.addField("parentField", DataType.STRING);

        var importedFields = new HashSet<>(List.of("my_imported_field"));
        DocumentType type = new DocumentType("test", importedFields);
        type.inherit(parent);
        type.addField("hint", DataType.INT);
        type.addField("hfloat", DataType.FLOAT);
        type.addField("hstring", DataType.STRING);
        type.addField("content", DataType.STRING);
        type.addField("truth", DataType.BOOL);

        StructDataType mystruct = new StructDataType("mystruct");
        mystruct.addField(new Field("key", DataType.INT));
        mystruct.addField(new Field("value", DataType.STRING));
        type.addField("mystruct", mystruct);

        ArrayDataType structarray = new ArrayDataType(mystruct);
        type.addField("structarray", structarray);

        type.addField("stringweightedset", new WeightedSetDataType(DataType.STRING, false, false));
        type.addField("mymap", new MapDataType(DataType.INT, DataType.STRING));
        type.addField("structarrmap", new MapDataType(DataType.STRING, structarray));

        ArrayDataType intarray = new ArrayDataType(DataType.INT);
        type.addField("intarray", intarray);
        type.addField("dense_tensor", TensorDataType.getTensor(TensorType.fromSpec("tensor(x[2])")));

        manager.registerDocumentType(parent);
        manager.registerDocumentType(type);

        // Create strange doctypes using identifiers within them, which we
        // can use to verify they are still parsed as doctypes.
        manager.registerDocumentType(new DocumentType("notandor"));
        manager.registerDocumentType(new DocumentType("ornotand"));
        manager.registerDocumentType(new DocumentType("andornot"));
        manager.registerDocumentType(new DocumentType("idid"));
        manager.registerDocumentType(new DocumentType("usergroup"));
        var userType = new DocumentType("user");
        userType.addField("id", DataType.INT);
        manager.registerDocumentType(userType);
        var groupType = new DocumentType("group");
        groupType.addField("iD", DataType.INT); // For checking case preservation
        manager.registerDocumentType(groupType);
    }
@author Simon Thoresen Hult
@author bratseth
document/src/test/java/com/yahoo/document/select/DocumentSelectorTestCase.java