/**
* Return {@link TestGroup}'s name assigned to a given annotation.
*/
public static String getGroupName(Class<? extends Annotation> annotationClass) {
TestGroup testGroup = annotationClass.getAnnotation(TestGroup.class);
if (testGroup == null)
throw new IllegalArgumentException("Annotation must have a @TestGroup annotation: "
+ annotationClass);
String tmp = RandomizedRunner.emptyToNull(testGroup.name());
return tmp == null ? annotationClass.getSimpleName().toLowerCase() : tmp;
}