title: To find the number of test methods in a JUnit TestCase
body: <p>Is there a way to know the number of test methods in a test case?</p>
  
  <p>What I want to do is have a test case which tests several scenarios and for all these i would be doing the data setUp() only once.  Similarly I would like to do the cleanup (tearDown()) once at the end of all the test methods.</p>
  
  <p>The current approach i am using is to maintain a counter for the number of test methods that are present in the file and decrement them in the tearDown method and do the cleanup when the count reaches 0.  But this counter needs to be taken care of whenever new test methods are added.</p>