@Test
  public void usesPeerAuthInitToGetCredentials() throws Exception {
    props.setProperty(SECURITY_PEER_AUTH_INIT, SpyAuthInit.class.getName() + ".create");

    SpyAuthInit auth = new SpyAuthInit();
    assertThat(auth.isClosed()).isFalse();

    SpyAuthInit.setAuthInitialize(auth);
    Properties credentials = authenticator.getCredentials(member, props);

    assertThat(credentials).isEqualTo(props);
    assertThat(auth.isClosed()).isTrue();
    assertThat(SpyAuthInit.getCreateCount()).isEqualTo(1);
  }
Unit tests GMSAuthenticator using old security.
geode-core/src/test/java/org/apache/geode/distributed/internal/membership/adapter/auth/GMSAuthenticatorWithAuthenticatorTest.java