@Test
  public void alertMessageProcessingDoesNotTriggerAdditionalAlertMessage() {
    alertingService.addAlertListener(member, WARNING);
    logger = spy(logger);

    String recursiveAlert = "Recursive Alert";
    doAnswer(invocation -> {
      logger.warn(recursiveAlert);
      return null;
    }).when(messageListener).received(isA(AlertListenerMessage.class));

    logger.warn(alertMessage);

    verify(messageListener, timeout(TIMEOUT).times(1)).received(isA(AlertListenerMessage.class));
    verify(logger, timeout(TIMEOUT).times(1)).warn(eq(recursiveAlert));
  }
Integration tests for {@link AlertingService} in a cluster member.
geode-core/src/integrationTest/java/org/apache/geode/alerting/internal/api/AlertingServiceWithClusterIntegrationTest.java