@BeforeClass
  public static void setUpBeforeClass() throws Exception {
    Class.forName(MiniHS2.getJdbcDriverName());
    confOverlay.put(ConfVars.POST_EXEC_HOOKS.varname, PostExecHook.class.getName());
    confOverlay.put(ConfVars.PRE_EXEC_HOOKS.varname, PreExecHook.class.getName());
    confOverlay.put(ConfVars.SEMANTIC_ANALYZER_HOOK.varname,
        SemanticAnalysisHook.class.getName());
    confOverlay.put(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "" + Boolean.FALSE);
    confOverlay.put(ConfVars.HIVE_FETCH_TASK_CACHING.varname, "" + false);
    // query history adds no value to this test, it would just bring iceberg handler dependency, which isn't worth
    // this should be handled with HiveConfForTests when it's used here too
    confOverlay.put(ConfVars.HIVE_QUERY_HISTORY_ENABLED.varname, "false");
    miniHiveKdc = new MiniHiveKdc();
    HiveConf hiveConf = new HiveConf();
    miniHS2 = MiniHiveKdc.getMiniHS2WithKerb(miniHiveKdc, hiveConf);
    miniHS2.start(confOverlay);
  }
Tests information retrieved from hooks, in Kerberos mode.
itests/hive-minikdc/src/test/java/org/apache/hive/minikdc/TestHs2HooksWithMiniKdc.java