@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 doesntFailIfOldPermissionsNotPresent() {
        Document role = insertRole("Dancing Monkey");
        Document user = insertUserWithRoles(role);

        migration.upgrade();

        assertThat(rolesCollection.find()).containsOnly(role);
        assertThat(usersCollection.find()).containsOnly(user);
    }