@BeforeClass
  public static void beforeClassSetup() throws Exception {
    System.setProperty("jceks.key.serialFilter", "java.lang.Enum;java.security.KeyRep;" +
        "java.security.KeyRep$Type;javax.crypto.spec.SecretKeySpec;" +
        "org.apache.hadoop.crypto.key.JavaKeyStoreProvider$KeyMetadata;!*");
    conf = new HiveConfForTest(TestParseUtilsStagingDir.class);
    conf.set("hadoop.security.key.provider.path", "jceks://file" + jksFile);

    miniDFSCluster =
        new MiniDFSCluster.Builder(conf).numDataNodes(1).format(true).build();

    DFSTestUtil.createKey("test_key", miniDFSCluster, conf);
    primary = new WarehouseInstance(LOG, miniDFSCluster, new HashMap<String, String>(),
        "test_key");
    SessionState.start((HiveConf) conf);
  }
Test ParseUtils to see if a staging dir is created.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestParseUtilsStagingDir.java