public Set<String> usagesOfProfile(final String profileId) {
        if (!ObjectId.isValid(profileId)) {
            return Set.of();
        }
        Set<String> usagesInIndexSet = new HashSet<>();
        indexSetsCollection
                .find(Filters.eq(FIELD_PROFILE_ID, profileId))
                .projection(Projections.include(INDEX_SET_ID))
                .map(document -> document.getObjectId(INDEX_SET_ID).toString())
                .into(usagesInIndexSet);
        return usagesInIndexSet;
    }
@Test
    public void testReturnsProperUsagesForSingleProfile() {
        assertEquals(Set.of("000000000000000000000001", "000000000000000000000011"),
                toTest.usagesOfProfile(PROFILE1_ID));
        assertEquals(Set.of("000000000000000000000002"),
                toTest.usagesOfProfile(PROFILE2_ID));
        assertEquals(Set.of(),
                toTest.usagesOfProfile(UNUSED_PROFILE_ID));
        assertEquals(Set.of(),
                toTest.usagesOfProfile(WRONG_PROFILE_ID));
    }