EventHelper { public static String dumpEvent(Event event) { return dumpEvent(event, DEFAULT_MAX_BYTES); }  static String dumpEvent(Event event); static String dumpEvent(Event event, int maxBytes);  }
@Test public void testPrintable() { SimpleEvent event = new SimpleEvent(); event.setBody("Some text".getBytes()); String eventDump = EventHelper.dumpEvent(event); System.out.println(eventDump); Assert.assertTrue(eventDump, eventDump.contains("Some text")); }
@Test public void testNonPrintable() { SimpleEvent event = new SimpleEvent(); byte[] body = new byte[5]; event.setBody(body); String eventDump = EventHelper.dumpEvent(event); Assert.assertTrue(eventDump, eventDump.contains(".....")); }