@Test
  public void testDisallowFallbackToSimple() throws Exception {
    clientConf.setBoolean(RpcClient.IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_KEY, false);
    rpcClient = createClient();
    UndeclaredThrowableException error =
      assertThrows(UndeclaredThrowableException.class, () -> echo("disallow"));
    Throwable cause = error.getCause().getCause().getCause();
    assertThat(cause, instanceOf(FallbackDisallowedException.class));
  }
Test secure client connecting to a non secure server, where we have multiple server principal
candidates for a rpc service. See HBASE-28321.
hbase-server/src/test/java/org/apache/hadoop/hbase/security/TestMultipleServerPrincipalsFallbackToSimple.java