title: JUnit crashes saying method should be static, then crashes saying it shouldn't?
body: <p>I'm trying to make a simple example test in JUnit that tests two things, then does teardown.</p>
  
  <pre><code>import org.junit.*;
  
  public class TestFoobar {
      @Test
      public void testOneThing() {
          // Code that tests one thing
      }
  
      @Test
      public void testAnotherThing() {
          // Code that tests another thing
      }
  
      @AfterClass
      @Test
      public void tearDownClass() throws Exception {
          // Code executed after the last test method 
      }
  }
  </code></pre>
  
  <p>When I try to run this, it crashes saying <code>tearDownClass</code> has to be static:</p>
  
  <pre><code>$ javac TestFoobar.java -cp junit-4.8.2.jar
  $ java -cp junit-4.8.2.jar:. org.junit.runner.JUnitCore TestFoobar
  JUnit version 4.8.2
  .E
  Time: 0.01
  There was 1 failure:
  1) initializationError(TestFoobar)
  java.lang.Exception: Method tearDownClass() should be static
      at org.junit.runners.model.FrameworkMethod.validatePublicVoid(FrameworkMethod.java:83)
      at org.junit.runners.model.FrameworkMethod.validatePublicVoidNoArg(FrameworkMethod.java:66)
      at org.junit.runners.ParentRunner.validatePublicVoidNoArgMethods(ParentRunner.java:122)
      at org.junit.runners.ParentRunner.collectInitializationErrors(ParentRunner.java:104)
      at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:119)
      at org.junit.runners.ParentRunner.validate(ParentRunner.java:269)
      at org.junit.runners.ParentRunner.&lt;init&gt;(ParentRunner.java:66)
      at org.junit.runners.BlockJUnit4ClassRunner.&lt;init&gt;(BlockJUnit4ClassRunner.java:58)
      at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:13)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
      at org.junit.runner.Computer.getRunner(Computer.java:38)
      at org.junit.runner.Computer$1.runnerForClass(Computer.java:29)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:93)
      at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:84)
      at org.junit.runners.Suite.&lt;init&gt;(Suite.java:79)
      at org.junit.runner.Computer.getSuite(Computer.java:26)
      at org.junit.runner.Request.classes(Request.java:69)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
      at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
      at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
      at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
  
  FAILURES!!!
  Tests run: 1,  Failures: 1
  </code></pre>
  
  <p>So I change <code>tearDownClass</code> to static, but now it says it should not be static:</p>
  
  <pre><code>$ javac TestFoobar.java -cp junit-4.8.2.jar
  $ java -cp junit-4.8.2.jar:. org.junit.runner.JUnitCore TestFoobar
  JUnit version 4.8.2
  .E
  Time: 0.01
  There was 1 failure:
  1) initializationError(TestFoobar)
  java.lang.Exception: Method tearDownClass() should not be static
      at org.junit.runners.model.FrameworkMethod.validatePublicVoid(FrameworkMethod.java:83)
      at org.junit.runners.model.FrameworkMethod.validatePublicVoidNoArg(FrameworkMethod.java:66)
      at org.junit.runners.ParentRunner.validatePublicVoidNoArgMethods(ParentRunner.java:122)
      at org.junit.runners.BlockJUnit4ClassRunner.validateTestMethods(BlockJUnit4ClassRunner.java:200)
      at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:174)
      at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:122)
      at org.junit.runners.ParentRunner.validate(ParentRunner.java:269)
      at org.junit.runners.ParentRunner.&lt;init&gt;(ParentRunner.java:66)
      at org.junit.runners.BlockJUnit4ClassRunner.&lt;init&gt;(BlockJUnit4ClassRunner.java:58)
      at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:13)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
      at org.junit.runner.Computer.getRunner(Computer.java:38)
      at org.junit.runner.Computer$1.runnerForClass(Computer.java:29)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:93)
      at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:84)
      at org.junit.runners.Suite.&lt;init&gt;(Suite.java:79)
      at org.junit.runner.Computer.getSuite(Computer.java:26)
      at org.junit.runner.Request.classes(Request.java:69)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
      at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
      at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
      at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
  
  FAILURES!!!
  Tests run: 1,  Failures: 1
  </code></pre>
  
  <p>Why?</p>