@Test
  public void dumpConfig() throws IOException {
    createConfFile("metastore-site.xml", true, "METASTORE_HOME", instaMap(
        "test.long", "23"
    ));
    conf = MetastoreConf.newMetastoreConf();
    String dump = MetastoreConf.dumpConfig(conf);
    Assert.assertThat(dump, new StringContains("Used metastore-site file: file:/"));
    Assert.assertThat(dump, new StringContains("Key: <test.long> old hive key: <hive.test.long>  value: <23>"));
    Assert.assertThat(dump, new StringContains("Key: <test.str> old hive key: <hive.test.str>  value: <defaultval>"));
    Assert.assertThat(dump, new StringEndsWith("Finished MetastoreConf object.\n"));
    // Make sure the hidden keys didn't get published
    Assert.assertThat(dump, CoreMatchers.not(new StringContains(ConfVars.PWD.getVarname())));
  }
Verify that a config can be set with a deprecated key/name.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/conf/TestMetastoreConf.java