1 package test.inheritance.testng471; 2 3 import org.testng.annotations.*; 4 5 public class Class2 extends SuperClass1 { 6 7 @BeforeClass beforeClass2()8 public void beforeClass2() { 9 } 10 11 @AfterClass afterClass2()12 public void afterClass2() { 13 } 14 15 @BeforeMethod beforeMethodClass2()16 public void beforeMethodClass2() { 17 } 18 19 @AfterMethod afterMethodClass2()20 public void afterMethodClass2() { 21 } 22 23 @Test test2_1()24 public void test2_1() { 25 } 26 27 @Test test2_2()28 public void test2_2() { 29 } 30 } 31