@Test public void standardJsonPrinting() throws Exception { Closer closer = Closer.create(); try { ByteArrayOutputStream baos = closer.register(new ByteArrayOutputStream()); PrintStream out = closer.register(new PrintStream(baos)); new JsonPrinter(out).print(standardProcess()); String result = new String(baos.toByteArray()); assertThat(result).contains("\"url\":\"service:jmx:rmi: } catch (Throwable t) { throw closer.rethrow(t); } finally { closer.close(); } }
public void print(JmxProcess process) throws Exception { mapper.writeValue(out, process); }
JsonPrinter { public void print(JmxProcess process) throws Exception { mapper.writeValue(out, process); } }
JsonPrinter { public void print(JmxProcess process) throws Exception { mapper.writeValue(out, process); } JsonPrinter(PrintStream out); }
JsonPrinter { public void print(JmxProcess process) throws Exception { mapper.writeValue(out, process); } JsonPrinter(PrintStream out); void print(JmxProcess process); void prettyPrint(JmxProcess process); }
JsonPrinter { public void print(JmxProcess process) throws Exception { mapper.writeValue(out, process); } JsonPrinter(PrintStream out); void print(JmxProcess process); void prettyPrint(JmxProcess process);  }