@Override
    public void upgrade() {
        MongoCollection<Document> roles = mongoDatabase.getCollection("roles");

        Document viewsUserRole = roles.findOneAndDelete(eq("name", "Views User"));

        if (viewsUserRole != null) {
            removeRoleFromUsers(viewsUserRole);
        }
    }
@Test
    public void removesRoleFromRolesCollection() {
        insertRole("Views User");
        Document otherRole = insertRole("Some Other Role");

        migration.upgrade();

        assertThat(rolesCollection.find()).containsOnly(otherRole);
    }