@Test
  public void testGetStagingDirEncrypted() throws Exception {
    Table table = createTable(TABLE, primary.warehouseRoot);
    QB qb = createQB(table);
    Context ctx = new Context(conf);
    Path path = SemanticAnalyzer.getStagingDirectoryPathname(qb, conf, ctx);
    Assert.assertTrue(miniDFSCluster.getFileSystem().exists(path.getParent()));
  }
Test to make sure staging directory is created when with no flags set when
the file system is encrypted.

Note: This might not be the correct behavior, but this was the behavior
HIVE-28173 was fixed. It is too risky to change behavior for
the default path.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestParseUtilsStagingDir.java