I am using the @BeforeClass annotation to ensure that a set of activities are done just once in a set of 5-6 tests. There is a hierarch of 3 java files.
File1 extends TestCase
File2 extends File 1 (this is where i have to put the beforeclass annotation at the setUp method)
File3 extends File2 (File 3 has the tests.. 5 in number, but i want the setup in file 2 to be run just once)
Right now, the setUp method in File 2 is being called before every test in File3. even after putting the @BeforeClass annotation. What can i do to ensure that this setup runs only once for all the tests in File 3