title: With jUnit 4, can I parameterize @BeforeClass?
body: <p>I am using jUnit to manage integration tests for an application that accesses a database. Because setting up the test data is a time-consuming operation, I have been doing that in the <code>@BeforeClass</code> method, which is executed only once per test class (as opposed to the <code>@Before</code> method, which is run once per test method).</p>
  
  <p>Now I want to try a few different permutations for the configuration of the data layer, running all of my tests on each different configuration. This seems like a natural use of the <code>Parameterized</code> test runner. Problem is, <code>Parameterized</code> supplies parameters to the class constructor, and the <code>@BeforeClass</code> method is abstract and is called before the class constructor.</p>
  
  <p>A few questions,</p>
  
  <p>Does <code>Parameterized</code> call the <code>@BeforeClass</code> method for each permutation of parameters, or does it only call once?</p>
  
  <p>If the <code>@BeforeClass</code> method is called repeatedly, is there some way to access the parameter values from inside of it?</p>
  
  <p>If none of these, what do people suggest as the best alternative approach to this problem?</p>