title: JUnit-Test for main() without saved objects
body: <p>I want to test the entry point of my Swing-Application, which is designed in MVP-pattern. <code>public static void main (String[] args)</code> does nothing more then launching a <code>MainPresenter</code> with its view and model.</p>
  
  <pre><code>public class JMasapp {
      public static void main(String[] args) {
          new MainPresenter(new MainView(), new DataModel());            
      }
  }
  </code></pre>
  
  <p>I want to test if the presenter, view and model is null. (<code>assertNotNull(...)</code>). Because of the design, i don't want to save the presenter or implement setters / getters for static objects. So</p>
  
  <pre><code>JMasapp jm = new JMasapp();
  jm.main(new String[] {"someArg","someOtherArg"});
  </code></pre>
  
  <p>wouldn't give a reference to the objects to test. Which way is the best to solve this problem?</p>