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