1 package test.timeout; 2 3 import org.testng.annotations.Test; 4 5 public class TimeOutWithParallelSample { 6 7 @Test(timeOut = 1_000) myTestMethod()8 public void myTestMethod() throws InterruptedException { 9 Thread.sleep(1_500); 10 } 11 } 12