1 package test.annotationtransformer; 2 3 import org.testng.annotations.Listeners; 4 import org.testng.annotations.Test; 5 6 /** 7 * This test will fail unless a time out transformer 8 * is applied to it. 9 * 10 * @author cbeust 11 * 12 */ 13 @Test(timeOut = 1000) 14 @Listeners(MySuiteListener.class) 15 public class AnnotationTransformerClassSampleTest { 16 one()17 public void one() { 18 try { 19 Thread.sleep(2000); 20 // ppp("FINISHED SLEEPING"); 21 } 22 catch (InterruptedException handled) { 23 Thread.currentThread().interrupt(); 24 // ppp("WAS INTERRUPTED"); 25 // ignore 26 } 27 } 28 ppp(String string)29 private void ppp(String string) { 30 System.out.println("[Transformer] " + string); 31 } 32 33 } 34