@VisibleForTesting
  public void updateServerHiveConf(Map<String, String> serverHiveConf, JdbcConnectionParams connParams) {
    if (serverHiveConf != null) {
      // Iterate over all Server configurations.
      Stream.of(ConfVars.values()).forEach(conf -> {
        String key = JdbcConnectionParams.HIVE_CONF_PREFIX + conf.varname;
        // Update Server HiveConf, only if a given configuration is not already set from the client.
        if (serverHiveConf.containsKey(conf.varname) && !connParams.getHiveConfs().containsKey(key)) {
          connParams.getHiveConfs().put(key, serverHiveConf.get(conf.varname));
        }
      });
    }
  }
This is a util method to parse the message from the TException and extract
the HTTP response code. In case of SAML 2.0 specification with redirect binding,
we expect the response code to be either 302 or 303. This method returns true, if
the response code was 302 and 303 else false based on the exception message.

This is not very clean. Ideally we should get the underlying HttpResponse, but
THttpClient doesn't expose that information.
jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java