ThreadDump { public void dump(OutputStream out) { dump(true, true, out); } ThreadDump(ThreadMXBean threadMXBean); void dump(OutputStream out); void dump(boolean lockedMonitors, boolean lockedSynchronizers, OutputStream out);  }
@Test public void dumpsAllThreads() { final ByteArrayOutputStream output = new ByteArrayOutputStream(); threadDump.dump(output); assertThat(output.toString()) .isEqualTo(String.format("\"runnable\" id=100 state=RUNNABLE%n" + " at Blah.blee(Blah.java:100)%n" + "%n" + "%n")); }