title: Junit test class variable scope
body: <p>I have a Junit test class with two tests in it. test 1 will add an element to an ArrayList and passes it to the main class to do some logic and returns true. Test two should use the same arrayList and calls the same main class do the same logic but by the time the list comes to second test methods, its getting null. </p>
  
  <p>I declared it as class variable. My questions is.. when I assign values to a class variable in a test method, will I not have access to the values in next test method? If yes, how should i retain the values.</p>
  
  <p>Thanks,
  Mahi</p>