@SuppressWarnings({"deprecation"})
private IAnnotation createTestTag(Class<?> cls, Annotation a,
IAnnotationTransformer transformer)
{
TestAnnotation result = new TestAnnotation();
Test test = (Test) a;
result.setEnabled(test.enabled());
result.setGroups(join(test.groups(), findInheritedStringArray(cls, Test.class, "groups")));
result.setParameters(test.parameters());
result.setDependsOnGroups(join(test.dependsOnGroups(),
findInheritedStringArray(cls, Test.class, "dependsOnGroups")));
result.setDependsOnMethods(join(test.dependsOnMethods(),
findInheritedStringArray(cls, Test.class, "dependsOnMethods")));
result.setTimeOut(test.timeOut());
result.setInvocationTimeOut(test.invocationTimeOut());
result.setInvocationCount(test.invocationCount());
result.setThreadPoolSize(test.threadPoolSize());
result.setSuccessPercentage(test.successPercentage());
result.setDataProvider(test.dataProvider());
// result.setDataProviderClass(test.dataProviderClass() != Object.class ?
// test.dataProviderClass() : null);
result.setDataProviderClass(
findInherited(test.dataProviderClass(), cls, Test.class, "dataProviderClass",
DEFAULT_CLASS));
result.setAlwaysRun(test.alwaysRun());
result.setDescription(
findInherited(test.description(), cls, Test.class, "description", DEFAULT_STRING));
result.setExpectedExceptions(test.expectedExceptions());
result.setExpectedExceptionsMessageRegExp(test.expectedExceptionsMessageRegExp());
result.setSuiteName(test.suiteName());
result.setTestName(test.testName());
result.setSequential(test.sequential());
result.setSingleThreaded(test.singleThreaded());
result.setRetryAnalyzer(test.retryAnalyzer());
result.setSkipFailedInvocations(test.skipFailedInvocations());
result.setIgnoreMissingDependencies(test.ignoreMissingDependencies());
result.setPriority(test.priority());
return result;
}