title: How to share JUnit BeforeClass logic among multiple test classes
body: <p>Currently, all of my JUnit tests extend from a common base class that provides methods tagged with  <code>@BeforeClass</code> and <code>@AfterClass</code> annotations - all these really do is setup a bunch of static resources/services for the tests to use.</p>
  
  <p>This seems a awkward to me for a few reasons:</p>
  
  <ol>
  <li>Part of the point of JUnit4 (from my understanding) is that we shouldn't need this classical test inheritance anymore.</li>
  <li>When I run these tests as part of a suite instead of individually (which we often do), the <code>@BeforeClass</code> and <code>@AfterClass</code> get invoked multiple times, slowing down the tests - we really should only be calling these once</li>
  </ol>
  
  <p>What I'd like to do is somehow move the current BeforeClass/AfterClass logic out of the inheritance chain and into something that can be shared by individual tests and the suite as a whole.  </p>
  
  <p><strong>Can this be done? If so, how?</strong>  (If it matters, I'm using JUnit 4.7, and it could be a hard sell to update to a different version)</p>