@Test
  public void getCredentialsShouldThrowIfPeerAuthInitGetCredentialsAndInitThrow() throws Exception {
    props.setProperty(SECURITY_PEER_AUTH_INIT,
        AuthInitGetCredentialsAndInitThrow.class.getName() + ".create");
    assertThatThrownBy(() -> authenticator.getCredentials(member, props))
        .hasMessage("expected init error");
  }
Unit tests GMSAuthenticator using new integrated security.
geode-core/src/test/java/org/apache/geode/distributed/internal/membership/adapter/auth/GMSAuthenticatorWithSecurityManagerTest.java