### Question:
LinkEvent extends DocumentBuilderEvent { @Override public String toString() { return String.format("link(%s,\"%s\")", hrefOrHashName, text); } LinkEvent(Attributes attributes, String hrefOrHashName, String text); @Override void invoke(DocumentBuilder builder); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testToString() { assertEquals("link(#name,\"text\")", new LinkEvent(new Attributes(), "#name", "text").toString()); }