title: static int value not changing upon adding
body: <p>I am facing a weird issue. I have an ErrorCollector which is based on an ArrayList. I want to throw at the end of all the tests the cumulative errors that have been collected by error collector.</p>
  
  <p>For that, I have written something like : </p>
  
  <pre><code>private static int noOfErrors;
  
  @Before
  public void setUp() {
  
      MockitoAnnotations.initMocks(this);
  
      this.mockMvc = MockMvcBuilders.standaloneSetup(myController).build();
  
      collector = new MyErrorCollector();
  }
  
  @After
  public void tearDown() {
  
      noOfErrors = noOfErrors + collector.getErrorCount();
  
      for (Throwable error : collector.getErrors()) {
          System.out.println(error.getMessage());
      }
      collector = null;
  }
  
  @AfterClass
  public static void finalTearDown(){
      assertEquals(noOfErrors, 0);
  }
  </code></pre>
  
  <p>But even though in my <code>@After</code> method, the collected errors in non zero, <code>assertEquals</code> method in <code>@AfterClass</code> method is not failing. Upon debugging, it is showing non zero <code>noOfErrors</code> in <code>tearDown</code> methodand vice versa for <code>finalTearDown</code>.</p>