@Test
  public void testConnectionRetries() throws Exception {
    setupIDP(true, USER_PASS_MODE);
    try (HiveConnection connection = new TestHiveConnectionWithInjectedFailure(
        getSamlJdbcConnectionUrlWithRetry(2), new Properties(), USER1, USER1_PASSWORD)) {
      assertLoggedInUser(connection, USER1);
    }
  }
Test injects failure in the first connection attempt and then makes sure that the
2nd retry works as expected.
itests/hive-unit/src/test/java/org/apache/hive/service/auth/saml/TestHttpSamlAuthentication.java