@Test public void testWriteException() { try { throw new RuntimeException(); } catch (Exception ex) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ex.printStackTrace(new PrintStream(baos)); String expected = "Exception: " + baos.toString() + " END" + newLine; event.write(ex, "END"); assertEquals(expected, out.toString()); } }
public void write(String msg) { if (active) { System.out.println(msg); } }
DefaultEvent implements Event { public void write(String msg) { if (active) { System.out.println(msg); } } }
DefaultEvent implements Event { public void write(String msg) { if (active) { System.out.println(msg); } }  }
DefaultEvent implements Event { public void write(String msg) { if (active) { System.out.println(msg); } }  void write(String msg); void write(Exception e, String msg); void activate(); void deactivate(); }
DefaultEvent implements Event { public void write(String msg) { if (active) { System.out.println(msg); } }  void write(String msg); void write(Exception e, String msg); void activate(); void deactivate();  }