DiffBase implements Diff<T1, T2> { protected void notifyListeners(final MatchResult result) { for (DiffListener listener: listeners) { listener.onEvent(result); } } DiffBase(final Collection<DiffListener> listeners);  DiffBase(); @Override void diff(final T1 object1, final T2 object2); void diff(final MatchResult<T1, T2> request); @Override void addListener(final DiffListener listener); @Override void removeListener(final DiffListener listener); @Override void addListeners(final Collection<DiffListener> newListeneres); @Override void removeListeners(final Collection<DiffListener> removed);  }
@Test public void shouldNotifyAllRegisteredListener() { diffBase.notifyListeners(matchResult); verify(listener1).onEvent(matchResult); verify(listener2).onEvent(matchResult); }