No Boris actually there are multiple data passing from these customs annotations on which there are multiple test decisions are taken.
@Krishna - Have tried the above block the problem is above one is to add annotation on class level while here we need to add an annotation at method level.
Even I have added annotation but not able to inject those added annotation to testmethod -
______________________
Class<?> superclass = testMethod.getClass().getSuperclass();
// Method method =
Field declaredField = null;
try {
declaredField = superclass.getDeclaredField("declaredAnnotations");
declaredField.setAccessible(true);
Map<Class<? extends Annotation>, Annotation> map =(Map<Class<? extends Annotation>, Annotation>) declaredField
.get(testMethod);
map.put(NewAnnotation.class,NewAnnotationObject) ;
declaredField.set(testMethod,map);
_____________________________
So at method scope level testMethod has now new annotation attached but on suite level that value is not yet set.
Any help will be highly appreciated.
Regards
Abhishek