AbstractSignal implements Signal<T> { @Override public Slot addOnce(T value) { return registerListener(value, true); }  @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 addOnce() throws Exception { Listener listener = mock(Listener.class); signal.addOnce(listener); signal.dispatch(); signal.dispatch(); verify(listener).call(); assertThat(signal.listenersCount(), is(0)); }