ClusterAlertMessaging implements AlertMessaging { @VisibleForTesting void processAlertListenerMessage(final AlertListenerMessage message) { verifyDistributionManagerCanProcessMessage(); message.process((ClusterDistributionManager) dm); } ClusterAlertMessaging(final InternalDistributedSystem system); @VisibleForTesting  ClusterAlertMessaging(final InternalDistributedSystem system, final DistributionManager dm,
      final AlertListenerMessageFactory alertListenerMessageFactory,
      final ExecutorService executor); @VisibleForTesting  ClusterAlertMessaging(final InternalDistributedSystem system, final DistributionManager dm,
      final AlertListenerMessageFactory alertListenerMessageFactory, final ExecutorService executor,
      final Consumer<AlertingIOException> alertingIOExceptionLogger); @Override void sendAlert(final DistributedMember member,
      final AlertLevel alertLevel,
      final Instant timestamp,
      final String threadName,
      final long threadId,
      final String formattedMessage,
      final String stackTrace); void close(); @Override String toString();  }
@Test public void processAlertListenerMessage_requires_ClusterDistributionManager() { ClusterAlertMessaging clusterAlertMessaging = spy(new ClusterAlertMessaging(system, mock(DistributionManager.class), alertListenerMessageFactory, mock(ExecutorService.class))); Throwable thrown = catchThrowable( () -> clusterAlertMessaging.processAlertListenerMessage(alertListenerMessage)); assertThat(thrown).isInstanceOf(IllegalArgumentException.class); }