public Map<String, String> getTypes(final Set<String> streamIds,
                                        final Set<String> fields) {
        final Map<String, Set<String>> allFieldTypes = this.get(streamIds);

        final Map<String, String> result = new HashMap<>(fields.size());
        fields.forEach(field -> {
            final Set<String> fieldTypes = allFieldTypes.get(field);
            typeFromFieldType(fieldTypes).ifPresent(s -> result.put(field, s));
        });

        return result;
    }
@Test
    void getTypesReturnsEmptyMapForNonExistingFields() {
        final Pair<IndexFieldTypesService, StreamService> services = mockServices(
                IndexFieldTypesDTO.create("indexSet1", "stream1", ImmutableSet.of(
                        FieldTypeDTO.create("existing_field", "long")
                )),
                IndexFieldTypesDTO.create("indexSet2", "stream2", ImmutableSet.of(
                        FieldTypeDTO.create("existing_field", "long")
                ))
        );

        final FieldTypesLookup lookup = new FieldTypesLookup(services.getLeft(), services.getRight());
        assertThat(lookup.getTypes(Set.of("stream1", "stream2"), Set.of("somefield1", "somefield2"))).isEmpty();
    }