### Question:
CharactersEvent extends DocumentBuilderEvent { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof CharactersEvent)) { return false; } CharactersEvent other = (CharactersEvent) obj; return Objects.equal(other.text, text); } CharactersEvent(String text); @Override void invoke(DocumentBuilder builder); String getText(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void equals() { assertEquality(new CharactersEvent("test it"), new CharactersEvent("test it")); assertInequality(new CharactersEvent("test it"), new CharactersEvent("test it again")); }