@Override
    public boolean isManagedIndex(String indexName) {
        return isManagedIndex(findAllMongoIndexSets(), indexName);
    }
@Test
    public void isManagedIndexWithManagedIndexReturnsTrue() {
        final IndexSetConfig indexSetConfig = mock(IndexSetConfig.class);
        final List<IndexSetConfig> indexSetConfigs = Collections.singletonList(indexSetConfig);
        final MongoIndexSet indexSet = mock(MongoIndexSet.class);
        when(mongoIndexSetFactory.create(indexSetConfig)).thenReturn(indexSet);
        when(indexSetService.findAll()).thenReturn(indexSetConfigs);
        when(indexSet.isManagedIndex("index")).thenReturn(true);

        assertThat(indexSetRegistry.isManagedIndex("index")).isTrue();
    }