code: private SortedMap<String, SortedSet<ITestNGMethod>> sortGroups(Map<String, Collection<ITestNGMethod>> groups)
      {
          SortedMap<String, SortedSet<ITestNGMethod>> sortedGroups = new TreeMap<String, SortedSet<ITestNGMethod>>();
          for (Map.Entry<String, Collection<ITestNGMethod>> entry : groups.entrySet())
          {
              SortedSet<ITestNGMethod> methods = new TreeSet<ITestNGMethod>(METHOD_COMPARATOR);
              methods.addAll(entry.getValue());
              sortedGroups.put(entry.getKey(), methods);
          }
          return sortedGroups;
      }
docs: Sorts groups alphabetically and also sorts methods within groups alphabetically
  (class name first, then method name).  Also eliminates duplicate entries.