### Question:
DocumentBuilderEvents { @Override public String toString() { return format("{0} [events={1}]", events); } DocumentBuilderEvents(List<DocumentBuilderEvent> events); List<DocumentBuilderEvent> getEvents(); void applyTo(DocumentBuilder builder); @Override String toString();  }### Answer:
@Test public void testToString() { BeginDocumentEvent event = new BeginDocumentEvent(); DocumentBuilderEvents events = new DocumentBuilderEvents(Lists.<DocumentBuilderEvent> newArrayList(event)); assertNotNull(events.toString()); assertTrue(events.toString().contains(event.toString())); }