*
* @see Rants#RANT_1
*/
private List<TestCandidate> collectTestCandidates(Description classDescription) {
// Get the test instance provider if explicitly stated.
TestMethodProviders providersAnnotation =
suiteClass.getAnnotation(TestMethodProviders.class);
// If nothing, fallback to the default.
final TestMethodProvider [] providers;
if (providersAnnotation != null) {
providers = new TestMethodProvider [providersAnnotation.value().length];
int i = 0;
for (Class<? extends TestMethodProvider> clazz : providersAnnotation.value()) {
try {
providers[i++] = clazz.newInstance();
} catch (Exception e) {
throw new RuntimeException(TestMethodProviders.class.getSimpleName() +
" classes could not be instantiated.", e);