public static HiveConf create(Configuration conf) {
        HiveConf hiveConf = new HiveConf(conf, HiveConf.class);
        // to make sure Hive configuration properties in conf not be overridden
        hiveConf.addResource(conf);
        return hiveConf;
    }
@Test
    public void testCreateHiveConf() {
        HiveConf hiveConf = createHiveConf();
        assertThat(hiveConf.getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL)).isTrue();

        // will override configurations from `hiveConf` with hive default values which default value
        // is null or empty string
        assertThat(
                        new HiveConf(hiveConf, HiveConf.class)
                                .getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL))
                .isFalse();

        assertThat(
                        HiveConfUtils.create(hiveConf)
                                .getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL))
                .isTrue();
    }