@Override
    public ResponseSchemaEntry apply(RequestedField field) {
        ResponseEntryDataType type = knownFields.stream()
                .filter(f -> f.name().equals(field.name()))
                .findFirst()
                .map(MappedFieldTypeDTO::type)
                .map(ResponseEntryDataType::fromFieldType)
                .orElse(ResponseEntryDataType.UNKNOWN);
        return ResponseSchemaEntry.field(field.toString(), type);
    }
@Test
    void testSchemaCreation() {
        final Set<MappedFieldTypeDTO> knownFields = Set.of(
                MappedFieldTypeDTO.create("age", org.graylog2.indexer.fieldtypes.FieldTypeMapper.LONG_TYPE),
                MappedFieldTypeDTO.create("salary", org.graylog2.indexer.fieldtypes.FieldTypeMapper.DOUBLE_TYPE),
                MappedFieldTypeDTO.create("position", org.graylog2.indexer.fieldtypes.FieldTypeMapper.STRING_TYPE)
        );

        final MessageFieldTypeMapper mapper = new MessageFieldTypeMapper(knownFields);

        Assertions.assertThat(mapper.apply(RequestedField.parse("age"))).isEqualTo(ResponseSchemaEntry.field("age", ResponseEntryDataType.NUMERIC));
        Assertions.assertThat(mapper.apply(RequestedField.parse("salary"))).isEqualTo(ResponseSchemaEntry.field("salary", ResponseEntryDataType.NUMERIC));
        Assertions.assertThat(mapper.apply(RequestedField.parse("position"))).isEqualTo(ResponseSchemaEntry.field("position", ResponseEntryDataType.STRING));
        Assertions.assertThat(mapper.apply(RequestedField.parse("nvmd"))).isEqualTo(ResponseSchemaEntry.field("nvmd", ResponseEntryDataType.UNKNOWN));
    }