1 package test.nested2; 2 3 import org.testng.annotations.Test; 4 5 public class TmpA { 6 public static class NestedAWithTest { 7 @Test nestedA()8 public void nestedA() {} 9 } 10 11 public static class NestedAWithoutTest { NestedAWithoutTest()12 public NestedAWithoutTest() { 13 throw new RuntimeException("TestNG should not instantiate me"); 14 } 15 nestedA()16 public void nestedA() {} 17 } 18 19 @Test 20 public static class DummyBase {} 21 22 public static class NestedAWithInheritedTest extends DummyBase { nestedWithInheritedTest()23 public void nestedWithInheritedTest() {} 24 } 25 26 }