@Override
    public List<IndexSetConfig> findAll() {
        return ImmutableList.copyOf((Iterator<? extends IndexSetConfig>) collection.find().sort(DBSort.asc("title")));
    }
@Test
    @MongoDBFixtures("MongoIndexSetServiceTest.json")
    public void findAll() throws Exception {
        final List<IndexSetConfig> configs = indexSetService.findAll();

        assertThat(configs)
                .isNotEmpty()
                .hasSize(3)
                .containsExactly(
                        IndexSetConfig.create(
                                "57f3d721a43c2d59cb750001",
                                "Test 1",
                                "This is the index set configuration for Test 1",
                                true, true,
                                "test_1",
                                4,
                                1,
                                MessageCountRotationStrategy.class.getCanonicalName(),
                                MessageCountRotationStrategyConfig.create(1000),
                                NoopRetentionStrategy.class.getCanonicalName(),
                                NoopRetentionStrategyConfig.create(10),
                                ZonedDateTime.of(2016, 10, 4, 17, 0, 0, 0, ZoneOffset.UTC),
                                "standard",
                                "test_1",
                                null,
                                1,
                                false
                        ),
                        IndexSetConfig.create(
                                "57f3d721a43c2d59cb750002",
                                "Test 2",
                                null,
                                true, false,
                                "test_2",
                                1,
                                0,
                                MessageCountRotationStrategy.class.getCanonicalName(),
                                MessageCountRotationStrategyConfig.create(2500),
                                NoopRetentionStrategy.class.getCanonicalName(),
                                NoopRetentionStrategyConfig.create(25),
                                ZonedDateTime.of(2016, 10, 4, 18, 0, 0, 0, ZoneOffset.UTC),
                                "standard",
                                "test_2",
                                null,
                                1,
                                false
                        ),
                        IndexSetConfig.create(
                                "57f3d721a43c2d59cb750003",
                                "Test 3",
                                "This is the index set configuration for Test 3 - with an index set index template",
                                true, null,
                                "test_3",
                                1,
                                0,
                                MessageCountRotationStrategy.class.getCanonicalName(),
                                MessageCountRotationStrategyConfig.create(2500),
                                NoopRetentionStrategy.class.getCanonicalName(),
                                NoopRetentionStrategyConfig.create(25),
                                ZonedDateTime.of(2016, 10, 4, 18, 0, 0, 0, ZoneOffset.UTC),
                                "standard",
                                "test_3",
                                EVENT_TEMPLATE_TYPE,
                                1,
                                false
                        )
                );
    }