void removeBuiltinRole(final String roleName) {
        final Bson roleFindingFilter = Filters.eq(RoleServiceImpl.NAME_LOWER, roleName.toLowerCase(Locale.ENGLISH));
        final MongoDatabase mongoDatabase = mongoConnection.getMongoDatabase();
        final MongoCollection<Document> rolesCollection = mongoDatabase.getCollection(RoleServiceImpl.ROLES_COLLECTION_NAME);

        final Document role = rolesCollection.find(roleFindingFilter)
                .projection(include("_id"))
                .first();

        if (role != null) {
            final ObjectId roleToBeRemovedId = role.getObjectId("_id");
            final MongoCollection<Document> usersCollection = mongoDatabase.getCollection(UserImpl.COLLECTION_NAME);
            final UpdateResult updateResult = usersCollection.updateMany(Filters.empty(), Updates.pull(UserImpl.ROLES, roleToBeRemovedId));
            if (updateResult.getModifiedCount() > 0) {
                LOG.info(StringUtils.f("Removed role %s from %d users", roleName, updateResult.getModifiedCount()));
            }
            final DeleteResult deleteResult = rolesCollection.deleteOne(roleFindingFilter);
            if (deleteResult.getDeletedCount() > 0) {
                LOG.info(StringUtils.f("Removed role %s ", roleName));
            } else {
                LOG.warn(StringUtils.f("Failed to remove role %s migration!", roleName));
            }
        }
    }
@Test
    public void testAttemptToRemoveNonExistingRoleDoesNotHaveEffectOnExistingUsersAndRoles() {
        final Document adminUserBefore = usersCollection.find(Filters.eq(UserImpl.USERNAME, TEST_ADMIN_USER_WITH_BOTH_ROLES)).first();
        final Document testUserBefore = usersCollection.find(Filters.eq(UserImpl.USERNAME, TEST_USER_WITH_FTM_MANAGER_ROLE_ONLY)).first();

        toTest.removeBuiltinRole("Bayobongo!");

        //both roles remain in DB
        assertEquals(2, rolesCollection.countDocuments());

        //both users are unchanged
        final Document adminUser = usersCollection.find(Filters.eq(UserImpl.USERNAME, TEST_ADMIN_USER_WITH_BOTH_ROLES)).first();
        final Document testUser = usersCollection.find(Filters.eq(UserImpl.USERNAME, TEST_USER_WITH_FTM_MANAGER_ROLE_ONLY)).first();
        assertEquals(adminUserBefore, adminUser);
        assertEquals(testUserBefore, testUser);
    }