@Test public void testOutputContainsLinkToWebSite() { PrintStream soutBackup = System.out; try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); System.setOut(new PrintStream(baos)); SniffyUsage.main(new String[]{}); assertTrue(new String(baos.toByteArray()).contains("sniffy.io")); } finally { System.setOut(soutBackup); } }
public static void main(String[] args) { System.out.println("Sniffy - interactive profiling tool"); System.out.println("See usage information at http: System.out.println(); System.out.println("Start as an agent using -javaagent:sniffy.jar=5555 parameter and navigate your browser to http: }
SniffyUsage { public static void main(String[] args) { System.out.println("Sniffy - interactive profiling tool"); System.out.println("See usage information at http: System.out.println(); System.out.println("Start as an agent using -javaagent:sniffy.jar=5555 parameter and navigate your browser to http: } }
SniffyUsage { public static void main(String[] args) { System.out.println("Sniffy - interactive profiling tool"); System.out.println("See usage information at http: System.out.println(); System.out.println("Start as an agent using -javaagent:sniffy.jar=5555 parameter and navigate your browser to http: }  }
SniffyUsage { public static void main(String[] args) { System.out.println("Sniffy - interactive profiling tool"); System.out.println("See usage information at http: System.out.println(); System.out.println("Start as an agent using -javaagent:sniffy.jar=5555 parameter and navigate your browser to http: }  static void main(String[] args); }
SniffyUsage { public static void main(String[] args) { System.out.println("Sniffy - interactive profiling tool"); System.out.println("See usage information at http: System.out.println(); System.out.println("Start as an agent using -javaagent:sniffy.jar=5555 parameter and navigate your browser to http: }  static void main(String[] args);  }