AbstractSignal implements Signal<T> { @Override public Slot remove(T value) { Slot slot = slotList.find(value); if (slot != null) { slotList.remove(slot); return slot; } return null; }  @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 remove() throws Exception { Listener listener = mock(Listener.class); signal.add(listener); signal.remove(listener); assertThat(signal.listenersCount(), is(0)); }