AbstractSignalNotificationHandler { protected static void assertState(final boolean state, final String message, final Object... arguments) { if (!state) { throw new IllegalStateException(String.format(message, arguments)); } } protected  AbstractSignalNotificationHandler(); boolean registerListener(final SignalListener listener); boolean unregisterListener(final SignalListener listener);  }
@Test public void assertStateWithValidStateDoesNotThrow() { AbstractSignalNotificationHandler.assertState(true, "TEST"); }
@Test public void assertStateWithInvalidStateThrowsIllegalStateException() { assertThatThrownBy(() -> AbstractSignalNotificationHandler.assertState(false, "Expected %1$s message!", "test")).isInstanceOf(IllegalStateException.class); }