1 package test.annotationtransformer;
2 
3 import org.testng.IAnnotationTransformer;
4 import org.testng.annotations.ITestAnnotation;
5 
6 import java.lang.reflect.Constructor;
7 import java.lang.reflect.Method;
8 
9 public class MyTimeOutTransformer implements IAnnotationTransformer {
10 
11   @Override
transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod)12   public void transform(ITestAnnotation annotation, Class testClass,
13       Constructor testConstructor, Method testMethod)
14   {
15     annotation.setTimeOut(5000); // 5 seconds
16   }
17 
18 
19 }
20