title: junit annotation
body: <p>I wish to launch the GUI application 2 times from Java test. How should we use <code>@annotation</code> in this case?</p>
  
  <pre><code>public class Toto { 
  
      @BeforeClass 
      public static void setupOnce() { 
          final Thread thread = new Thread() {
              public void run() {
                 //launch appli
              }
          }; 
          try { 
              thread.start(); 
          } catch (Exception ex) { } 
      }
  } 
  </code></pre>
  
  
  
  <pre><code>public class Test extends toto {
      @Test 
      public void test() {
          setuptonce(); 
          closeAppli(); 
      } 
  
      @test 
      public void test2() 
      {
          setuptonce(); 
      } 
  }
  </code></pre>
  
  <p>To launch it a second time, which annotation should I use? <code>@afterclass</code>?</p>