title: Junit before class ( non static )
body: <p>Are there any best practices to get Junit execute a function once in a test file , and it should also not be static.</p>
  
  <p>like <code>@BeforeClass</code> on non static function?</p>
  
  <p>Here is an ugly solution :</p>
  
  <pre><code>@Before void init(){
      if (init.get() == false){
          init.set(true);
          // do once block
      }
  }
  </code></pre>
  
  <p>well this is something i dont want to do , and i am looking for an integrated junit solution.</p>