title: In JUnit 4, is there a way to run a piece of code before all @BeforeClass in a custom runner that extends BlockJUnit4ClassRunner
body: <p>I would like to run some methods before <code>@BeforeClass</code> is invoked in a custom runner that extends <code>BlockJUnit4ClassRunner</code>.</p>
  
  <p>How do I do this?</p>
  
  <p>When overriding the <code>runChild</code> method, I've discovered that it runs per test method.</p>
  
  <pre><code>protected void runChild(FrameworkMethod child, RunNotifier notifier) {
      System.out.println("a");
      super.runChild(child, notifier);
      System.out.println("b");
  }
  </code></pre>
  
  <p>Yields the following output:</p>
  
  <pre><code>a
  test here
  b
  a
  test here
  b
  </code></pre>