@Test
  public void testHiveHistoryConfigEnabled() throws Exception {
      HiveConf conf = getHiveConf();
      conf.setBoolVar(ConfVars.HIVE_SESSION_HISTORY_ENABLED, true);
      SessionState ss = new CliSessionState(conf);
      SessionState.start(ss);
      HiveHistory hHistory = ss.getHiveHistory();
      assertEquals("checking hive history class when history is enabled",
          hHistory.getClass(), HiveHistoryImpl.class);
  }
Check if HiveHistoryImpl class is returned when hive history is enabled
@throws Exception
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/history/TestHiveHistory.java