### Question:
WikiCopiedEvent extends AbstractWikiEvent { @Override public boolean matches(Object otherEvent) { boolean matches = super.matches(otherEvent); if (matches) { WikiCopiedEvent wikiCopiedEvent = (WikiCopiedEvent) otherEvent; matches = getTargetWikiId() == null || getTargetWikiId().equals(wikiCopiedEvent.getTargetWikiId()); } return matches; } WikiCopiedEvent();  WikiCopiedEvent(String sourceWikiId, String targetWikiId); @Override boolean matches(Object otherEvent); String getSourceWikiId(); String getTargetWikiId();  }### Answer:
@Test public void match() { assertTrue(new WikiCopiedEvent().matches(new WikiCopiedEvent())); assertTrue(new WikiCopiedEvent().matches(new WikiCopiedEvent("source", "target"))); assertTrue(new WikiCopiedEvent().matches(new WikiCopiedEvent("source", null))); assertTrue(new WikiCopiedEvent().matches(new WikiCopiedEvent(null, "target"))); assertTrue(new WikiCopiedEvent("source", "target").matches(new WikiCopiedEvent("source", "target"))); assertTrue(new WikiCopiedEvent(null, "target").matches(new WikiCopiedEvent("source", "target"))); assertTrue(new WikiCopiedEvent("source", null).matches(new WikiCopiedEvent("source", "target"))); assertFalse(new WikiCopiedEvent(null, "target2").matches(new WikiCopiedEvent("source", "target"))); assertFalse(new WikiCopiedEvent("source2", null).matches(new WikiCopiedEvent("source", "target"))); }