title: Java jUnit: Test suite code to run before any test classes
body: <p>I have a test suite class:</p>
  
  <pre><code>@RunWith(Suite.class)
  @Suite.SuiteClasses({
      GameMasterTest.class,
      PlayerTest.class,
  })
  public class BananaTestSuite { 
  </code></pre>
  
  <p>What annotation do I need to use to make a function in this class run before any of the classes containing actual tests? Right now, I'm doing this, and it works, but it's not as readable as it could be:</p>
  
  <pre><code>static {
      try {
          submitPeelAction = new Player(new GameMaster(1)).getClass().getDeclaredMethod("submitPeelAction");
      } catch (SecurityException e) {
          e.printStackTrace();
      } catch (NoSuchMethodException e) {
          e.printStackTrace();
      }
      submitPeelAction.setAccessible(true);
  }
  </code></pre>
  
  <p>I tried <code>@BeforeClass</code> but it didn't work.</p>