public static String[] groupsForThisMethodForTest(Method m, IAnnotationFinder finder) {
List<String> vResult = Lists.newArrayList();
Class<?> cls = m.getDeclaringClass();
// Collect groups on the class
ITestAnnotation tc = AnnotationHelper.findTest(finder, cls);
if (null != tc) {
for (String group : tc.getGroups()) {
vResult.add(group);
}
}
// Collect groups on the method
ITestAnnotation tm = AnnotationHelper.findTest(finder, m);
if (null != tm) {
String[] groups = tm.getGroups();
// ppp("Method:" + m + " #Groups:" + groups.length);
for (String group : groups) {
vResult.add(group);
}