@Subscribe
    @AllowConcurrentEvents
    public void handleIndexDeletion(IndicesDeletedEvent event) {
        for (String index : event.indices()) {
            LOG.debug("Index \"{}\" has been deleted. Removing index range.", index);
            if (remove(index)) {
                auditEventSender.success(AuditActor.system(nodeId), ES_INDEX_RANGE_DELETE, ImmutableMap.of("index_name", index));
            }
        }
    }
@Test
    @MongoDBFixtures("MongoIndexRangeServiceTest.json")
    public void testHandleIndexDeletion() throws Exception {
        assertThat(indexRangeService.findAll()).hasSize(2);

        localEventBus.post(IndicesDeletedEvent.create(Collections.singleton("graylog_1")));

        assertThat(indexRangeService.findAll()).hasSize(1);
    }