private List<String> getGroups(Identity identity) {
   List<Role> roles = identity.getRoles();
   List<String> groups = new ArrayList<String>(roles.size());
   for (Role r : roles) {
     groups.add(r.getName().trim());
   }
   return groups;
 }
 private boolean containsGroup(List<String> groups, List<Role> roles) {
   for (String g : groups) {
     for (Role r : roles) {
       // System.out.println(" ->  Role: '"+r.getName()+"' == '"+g+"'");
       if (r.getName().trim().equals(g.trim())) {
         //  System.out.println(" YEAH!!!!  Role: '"+r.getName()+"' == '"+g+"'");
         return true;
       }
     }
   }
   return false;
 }