@Before equal to version 3 setUp() method
@After equal to version 3 tearDown() method
@BeforeClass one testcase invoke once
@AfterClass one testcase invoke once
@Test(expected=NullPointerException.class) to expect method throw NullPointerException
@RunWith(value=org.junit.runners.Suite.class)
@SuiteClasses(value={UtilsTest.class, UtilsTest1.class})
@RunWith(value=org.junit.internal.runners.JUnit38ClassRunner.class) Compatible with version 3
You need to remember that both the @Before/@After and @BeforeClass/@AfterClass
annotated methods must be public. The @BeforeClass/@AfterClass annotated methods must be public and static.