AbstractSignal implements Signal<T> { @Override public void dispatch(Object... values) { for (Slot slot : slotList) { slot.execute(values); } }  @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 dispatch() throws Exception { for (int i = 0; i < 3; ++i) { Object[] args = new Object[i]; for (int j = 0; j < i; ++j) { args[j] = new Object(); } Listener listener = mock(Listener.class); signal.add(listener); signal.dispatch(args); verify(listener).call(args); } }