@Before
  public void setUp() {
    alertMessage = "Alerting in " + testName.getMethodName();
    exceptionMessage = "Exception in " + testName.getMethodName();
    connectionName = "Member in " + testName.getMethodName();
    threadName = Thread.currentThread().getName();
    threadId = Thread.currentThread().getId();

    messageListener = spy(AlertListenerMessage.Listener.class);
    addListener(messageListener);

    String startLocator = getServerHostName() + "[" + getRandomAvailableTCPPort() + "]";

    Properties config = new Properties();
    config.setProperty(START_LOCATOR, startLocator);
    config.setProperty(NAME, connectionName);

    system = (InternalDistributedSystem) DistributedSystem.connect(config);
    member = system.getDistributedMember();
    logger = LogService.getLogger();

    alertingService = system.getAlertingService();
  }
Integration tests for {@link AlertingService} in a cluster member.
geode-core/src/integrationTest/java/org/apache/geode/alerting/internal/api/AlertingServiceWithClusterIntegrationTest.java