@Override
    public void beforeClass(HiveTestEnvContext ctx) throws Exception {

      File confFolder = new File(ctx.tmpFolder, "conf");

      FileUtils.copyDirectory(new File(DATA_DIR + "/conf/"), confFolder);
      FileUtils.copyDirectory(new File(DATA_DIR + "/conf/tez"), confFolder);

      HiveConf.setHiveSiteLocation(new File(confFolder, "hive-site.xml").toURI().toURL());
      HiveConf.setHivemetastoreSiteUrl(new File(confFolder, "hivemetastore-site.xml").toURI().toURL());
      // FIXME: hiveServer2SiteUrl is not settable?

      ctx.hiveConf = new HiveConf(IDriver.class);
      ctx.hiveConf.setBoolVar(ConfVars.HIVE_IN_TEST_IDE, true);
    }
Helps in setting up environments to run high level hive tests

For a sample testcase see {@link TestHiveTestEnvSetup}!
Because setting up such a complex environment is a bit more sophisticated than it should;
this class introduces some helper concepts beyond what juni4 has

<ul>
 <li>parts are decomposed into smaller {@link IHiveTestRule}
 <li>{@link HiveTestEnvContext} is visible to every methodcall</li>
 <li>invocation order of before calls are "forward"
 <li>invocation order of before calls are "backward"
 </ul>


Later this should be migrated to junit5...when it will be possible; see HIVE-18495
ql/src/test/org/apache/hive/testutils/HiveTestEnvSetup.java