StandaloneJUnitRunnerMain { public static void main(String... args) { PrintStream err = System.err; if (args.length == 0) { err.println("Usage:"); err.println(" each argument is a comma separated list of junit testclass names to run in it's own thread"); err.println("Example:"); err.println(" Class1 ClassA,ClassB Class2"); err.println(" Will start 3 threads, where ClassA and ClassB are run in sequence in one thread"); err.println("System properties:"); err.println(" -Doutput.dir\tOutput directory for results"); exit(1); } try { new StandaloneJUnitRunner().main(args); } catch (Throwable t) { err.println(t.getMessage()); exit(1); } exit(0); }  static void main(String... args);  }
@Test public void testUsage() { expect.expectMessage("Exit disabled: 1"); StandaloneJUnitRunnerMain.main(); }
@Test public void testFailingTests() { expect.expectMessage("Exit disabled: 1"); StandaloneJUnitRunnerMain.main(SimpleTestNotForMaven.class.getName()); }
@Test public void testSuccess() { expect.expectMessage("Exit disabled: 0"); StandaloneJUnitRunnerMain.main(SuccessTestNotForMaven.class.getName()); }