Map<String, XmlSuite> suites = new HashMap<String, XmlSuite>();
IAnnotationFinder finder = getAnnotationFinder();
for (int i = 0; i < classes.length; i++) {
Class c = classes[i];
ITest test = (ITest) finder.findAnnotation(c, ITest.class);
String suiteName = getDefaultSuiteName();
String testName = getDefaultTestName();
if (test != null) {
final String candidateSuiteName = test.getSuiteName();
if (candidateSuiteName != null && !"".equals(candidateSuiteName)) {
suiteName = candidateSuiteName;
}
final String candidateTestName = test.getTestName();
if (candidateTestName != null && !"".equals(candidateTestName)) {
testName = candidateTestName;
}
}
XmlSuite xmlSuite = suites.get(suiteName);