private ThriftHttpServlet createThriftHttpServletWithAuthTypes(List<AuthTypes> authTypesList)
          throws Exception {
    HiveConf hiveConf = new HiveConf();
    String authType = authTypesList.stream().map(Object::toString)
      .collect(Collectors.joining(","));
    hiveConf.setVar(HiveConf.ConfVars.HIVE_SERVER2_AUTHENTICATION, authType);
    // the content of the URL below is the same as jwtVerificationJWKSFile
    hiveConf.setVar(HiveConf.ConfVars.HIVE_SERVER2_AUTHENTICATION_JWT_JWKS_URL,
  "http://localhost:" + MOCK_JWKS_SERVER_PORT + "/jwks");
    return new ThriftHttpServlet(null, null, null, null, null, hiveConf);
  }
Tests the logic that determines whether a given authentication mode
should be checked based on the Authorization header.
itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestIsAuthTypeEnabled.java