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

    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() == 1).isTrue();
  }
Unit tests GMSAuthenticator using new integrated security.
geode-core/src/test/java/org/apache/geode/distributed/internal/membership/adapter/auth/GMSAuthenticatorWithSecurityManagerTest.java