@Override
    public Map<String, Set<String>> getAllIndexAliases() {
        final Map<String, Set<String>> indexNamesAndAliases = indices.getIndexNamesAndAliases(getIndexWildcard());

        // filter out the restored archives from the result set
        return indexNamesAndAliases.entrySet().stream()
                .filter(e -> isGraylogDeflectorIndex(e.getKey()))
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
    }
@Test
    public void getAllGraylogDeflectorIndices() {
        final Map<String, Set<String>> indexNameAliases = ImmutableMap.of(
                "graylog_1", Collections.emptySet(),
                "graylog_2", Collections.emptySet(),
                "graylog_3", Collections.emptySet(),
                "graylog_4_restored_archive", Collections.emptySet(),
                "graylog_5", Collections.singleton("graylog_deflector"));

        when(indices.getIndexNamesAndAliases(anyString())).thenReturn(indexNameAliases);

        final MongoIndexSet mongoIndexSet = createIndexSet(config);
        final Map<String, Set<String>> deflectorIndices = mongoIndexSet.getAllIndexAliases();

        assertThat(deflectorIndices).containsOnlyKeys("graylog_1", "graylog_2", "graylog_3", "graylog_5");
    }