@Override
    public Set<IndexSet> getAll() {
        return ImmutableSet.copyOf(findAllMongoIndexSets());
    }
@Test
    public void getAllShouldBeCachedForNonEmptyList() {
        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);

        assertThat(this.indexSetRegistry.getAll())
            .isNotNull()
            .isNotEmpty()
            .hasSize(1)
            .containsExactly(indexSet);

        assertThat(this.indexSetRegistry.getAll())
            .isNotNull()
            .isNotEmpty()
            .hasSize(1)
            .containsExactly(indexSet);

        verify(indexSetService, times(1)).findAll();
    }