String methodName = null;
if (matcher.matches()) {
className = matcher.group(2);
methodName = matcher.group(1);
}
return new DefaultTestDescriptor(id, className, methodName);
}
// JUnit4TestCaseFacade is-a Describable in junit 4.7+
if (test instanceof Describable) {
Describable describable = (Describable) test;
Description description = describable.getDescription();
return new DefaultTestDescriptor(id, description.getClassName(), description.getMethodName());
}
return super.convert(id, test);
}