@Override
  public void preTest(HiveConf conf) throws Exception {
    super.preTest(conf);

    setUpFixtures(conf);

    // Set some properties since HiveConf gets recreated for the new query
    Path hbaseRoot = util.getDefaultRootDirPath();
    conf.set(HConstants.HBASE_DIR, hbaseRoot.toUri().toString());

    String auxJars = conf.getAuxJars();
    auxJars = (StringUtils.isBlank(auxJars) ? "" : (auxJars + ",")) + "file://"
      + new JobConf(conf, HBaseConfiguration.class).getJar();
    auxJars += ",file://" + new JobConf(conf, HBaseSerDe.class).getJar();
    auxJars += ",file://" + new JobConf(conf, Watcher.class).getJar();
    conf.setAuxJars(auxJars);
  }
HBaseTestSetup defines HBase-specific test fixtures which are
reused across testcases.
itests/util/src/main/java/org/apache/hadoop/hive/hbase/HBaseTestSetup.java