MediaEvent { @Override public String toString() { return toStringHelper(this) .add("type", type) .add("parameter", parameter) .toString(); } MediaEvent(final MediaEventType type, final String parameter); MediaEventType getType(); String getParameter(); @Override String toString();  }
@Test public void testToString() throws Exception { MediaEvent event1 = buildMediaEvent(""); MediaEvent event2 = buildMediaEvent(""); assertNotNull(event1.toString()); assertEquals(event1.toString(), event2.toString()); }