AbstractSignal implements Signal<T> { @Override public Slot add(T value) { return registerListener(value, false); }  @Override Slot addOnce(T value); @Override Slot add(T value); @Override void dispatch(Object... values); @Override Slot remove(T value); @Override void removeAll(); @Override int listenersCount();  }
@Test public void add() throws Exception { Listener[] listeners = new Listener[5]; for (int i = 0; i < listeners.length; ++i) { listeners[i] = mock(Listener.class); signal.add(listeners[i]); } signal.dispatch(); for (Listener listener : listeners) { verify(listener).call(); } assertThat(signal.listenersCount(), is(5)); }