1 package test.skipex; 2 3 import org.testng.SkipException; 4 import org.testng.annotations.Test; 5 6 public class SkipAndExpectedSampleTest { 7 @Test(expectedExceptions = NullPointerException.class) 8 public void a2() { 9 throw new SkipException("test"); 10 } 11 12 } 13