@Test public void printsSimpleResponse() throws Exception { try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) { new Main(new PrintStream(baos), "--help").exec(); MatcherAssert.assertThat( new String(baos.toByteArray()), Matchers.containsString("skeleton") ); } }
public void exec() { if ("--help".equals(this.args[0])) { this.stdout.append("It is just a skeleton"); } else { this.stdout.append("Usage: --help"); } }
Main { public void exec() { if ("--help".equals(this.args[0])) { this.stdout.append("It is just a skeleton"); } else { this.stdout.append("Usage: --help"); } } }
Main { public void exec() { if ("--help".equals(this.args[0])) { this.stdout.append("It is just a skeleton"); } else { this.stdout.append("Usage: --help"); } } Main(final PrintStream out, final String... input); }
Main { public void exec() { if ("--help".equals(this.args[0])) { this.stdout.append("It is just a skeleton"); } else { this.stdout.append("Usage: --help"); } } Main(final PrintStream out, final String... input); static void main(final String... input); void exec(); }
Main { public void exec() { if ("--help".equals(this.args[0])) { this.stdout.append("It is just a skeleton"); } else { this.stdout.append("Usage: --help"); } } Main(final PrintStream out, final String... input); static void main(final String... input); void exec();  }