@Override
    protected void injectBrowserSSOError() throws Exception {
      if (failureToggle) {
        failureToggle = false;
        throw new Exception("Injected failure");
      }
    }
Test HiveConnection which injects a HTMLUnit based browser client.
itests/hive-unit/src/test/java/org/apache/hive/service/auth/saml/TestHttpSamlAuthentication.java