@Override
    public IndexSetConfig getDefault() {
        final DefaultIndexSetConfig defaultIndexSetConfig = clusterConfigService.get(DefaultIndexSetConfig.class);

        checkState(defaultIndexSetConfig != null, "No default index set configured. This is a bug!");

        final String indexSetId = defaultIndexSetConfig.defaultIndexSetId();
        return get(indexSetId)
                .orElseThrow(() -> new IllegalStateException("Couldn't find default index set <" + indexSetId + ">. This is a bug!"));
    }
@Test
    @MongoDBFixtures("MongoIndexSetServiceTest.json")
    public void getDefault() throws Exception {
        clusterConfigService.write(DefaultIndexSetConfig.create("57f3d721a43c2d59cb750002"));

        final IndexSetConfig indexSetConfig = indexSetService.getDefault();

        assertThat(indexSetConfig).isNotNull();
        assertThat(indexSetConfig.id()).isEqualTo("57f3d721a43c2d59cb750002");
    }