@Test
  public void gatewayHandShakeShouldAuthenticate() {
    londonLocatorVM.invoke("start London locator", () -> {
      Properties config = createLocatorConfig(londonId, londonLocatorPort, newYorkLocatorPort);
      cacheRule.createCache(config);
    });

    newYorkLocatorVM.invoke("start New York locator", () -> {
      Properties config = createLocatorConfig(newYorkId, newYorkLocatorPort, londonLocatorPort);
      cacheRule.createCache(config);
    });

    londonServerVM.invoke("create London server", () -> {
      assertThat(AUTHENTICATE_COUNT.get()).isEqualTo(0);
      startServer(londonId, londonLocatorPort, newYorkId, newYorkName, londonReceiverPort);
    });

    newYorkServerVM.invoke("create New York server", () -> {
      assertThat(AUTHENTICATE_COUNT.get()).isEqualTo(0);
      startServer(newYorkId, newYorkLocatorPort, londonId, londonName, newYorkReceiverPort);
    });

    londonServerVM.invoke(() -> {
      GatewaySender sender = cacheRule.getCache().getGatewaySender(newYorkName);
      await().untilAsserted(() -> assertThat(isRunning(sender)).isTrue());
    });

    newYorkServerVM.invoke(() -> {
      GatewaySender sender = cacheRule.getCache().getGatewaySender(londonName);
      await().untilAsserted(() -> assertThat(isRunning(sender)).isTrue());
    });

    newYorkServerVM.invoke(() -> {
      Region<Integer, Integer> region = cacheRule.getCache().getRegion(REGION_NAME);
      assertThat(region).isNotNull();
      assertThat(region.isEmpty()).isTrue();
    });

    londonServerVM.invoke(() -> {
      Region<Integer, Integer> region = cacheRule.getCache().getRegion(REGION_NAME);
      region.put(0, 0);
    });

    newYorkServerVM.invoke(() -> {
      Region<Integer, Integer> region = cacheRule.getCache().getRegion(REGION_NAME);
      assertThat(region).isNotNull();
      await()
          .untilAsserted(() -> assertThat(region.isEmpty()).isFalse());
    });

    newYorkLocatorVM.invoke(() -> {
      assertThat(AUTHENTICATE_COUNT.get()).isEqualTo(0);
    });
    londonLocatorVM.invoke(() -> {
      assertThat(AUTHENTICATE_COUNT.get()).isEqualTo(0);
    });
    newYorkServerVM.invoke(() -> {
      assertThat(AUTHENTICATE_COUNT.get()).isGreaterThanOrEqualTo(1);
    });
    londonServerVM.invoke(() -> {
      assertThat(AUTHENTICATE_COUNT.get()).isGreaterThanOrEqualTo(1);
    });
  }
Use of SECURITY_CLIENT_AUTHENTICATOR should result in the servers performing authentication
during HandShake of Gateway Sender/Receiver connecting.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/GatewayLegacyAuthenticationRegressionTest.java