private void cleanupUserAndRoles(final ITenant tenant) {
   loginAsRepositoryAdmin();
   for (IPentahoRole role : userRoleDao.getRoles(tenant)) {
     userRoleDao.deleteRole(role);
   }
   for (IPentahoUser user : userRoleDao.getUsers(tenant)) {
     userRoleDao.deleteUser(user);
   }
 }
 private void cleanupUserAndRoles(String userName, ITenant tenant) {
   login(
       userName,
       tenant,
       new String[] {tenantAdminAuthorityName, tenantAuthenticatedAuthorityName});
   for (IPentahoRole role : userRoleDao.getRoles()) {
     userRoleDao.deleteRole(role);
   }
   for (IPentahoUser user : userRoleDao.getUsers()) {
     userRoleDao.deleteUser(user);
   }
   logout();
 }
 private void cleanupUserAndRoles(final ITenant tenant) {
   loginAsRepositoryAdmin();
   for (IPentahoRole role : userRoleDao.getRoles(tenant)) {
     try {
       userRoleDao.deleteRole(role);
     } catch (Exception e) {
       // System role deletion will throw Exception
     }
   }
   for (IPentahoUser user : userRoleDao.getUsers(tenant)) {
     userRoleDao.deleteUser(user);
   }
 }