@Test
  public void unregisterListenerWithSignalListenerAndAllSignals() {
    AbstractSignalNotificationHandler signalHandler = createSignalNotificationHandler();
    SignalListener mockSignalListener = mock(SignalListener.class, "SIGALL");

    assertThat(signalHandler.isListening(mockSignalListener)).isFalse();
    assertThat(signalHandler.registerListener(mockSignalListener)).isTrue();
    assertThat(signalHandler.isListening(mockSignalListener)).isTrue();

    for (Signal signal : Signal.values()) {
      assertThat(signalHandler.hasListeners(signal)).isTrue();
      assertThat(signalHandler.isListening(mockSignalListener, signal)).isTrue();
      assertThat(signalHandler.unregisterListener(mockSignalListener, signal)).isTrue();
      assertThat(signalHandler.isListening(mockSignalListener, signal)).isFalse();
      assertThat(signalHandler.hasListeners(signal)).isFalse();
    }

    assertThat(signalHandler.unregisterListener(mockSignalListener)).isFalse();
  }
Unit tests for {@link AbstractSignalNotificationHandler}.

@since GemFire 7.0
geode-core/src/test/java/org/apache/geode/internal/process/signal/AbstractSignalNotificationHandlerTest.java