private static MethodDoc[] getTestMethods(ClassDoc c) {
    Set set = new TreeSet();
    while (c != null) {
      MethodDoc[] methods = c.methods();
      for (MethodDoc method : methods) {
        if (method.isPublic() && method.parameters().length == 0
            && method.name().startsWith("test")) {
          set.add(method);
        }
      }

      c = c.superclass();
    }

    return (MethodDoc[]) set.toArray(new MethodDoc[0]);
  }
Returns an array containing all of the "test" methods (including those that are inherited) for
the given class.
geode-core/src/test/java/org/apache/geode/UnitTestDoclet.java