@Test
public void skippedExceptionInTestMethods() {
TestListenerAdapter listener= new TestListenerAdapter();
TestNG test= new TestNG(false);
test.addListener(listener);
test.setVerbose(0);
test.setTestClasses(new Class[] {TestSkippedExceptionTest.class});
test.run();
List<ITestResult> skips= listener.getSkippedTests();
List<ITestResult> failures= listener.getFailedTests();
Assert.assertEquals(skips.size(), 1);
Assert.assertEquals(failures.size(), 1);
Assert.assertEquals(skips.get(0).getMethod().getMethodName(), "genericSkipException");