@Test
public void testUpdateHiveEnvContentHDP23() throws Exception {

  UpgradeCatalog220 upgradeCatalog220 = new UpgradeCatalog220(injector);
  String testContent = "# The heap size of the jvm stared by hive shell script can be controlled via:\n" +
          "\n" +
          "# Larger heap size may be required when running queries over large number of files or partitions.\n";
  String expectedResult = "# The heap size of the jvm stared by hive shell script can be controlled via:\n" +
          "\n" +
          "if [ \"$SERVICE\" = \"metastore\" ]; then\n" +
          "  export HADOOP_HEAPSIZE={{hive_metastore_heapsize}} # Setting for HiveMetastore\n" +
          "else\n" +
          "  export HADOOP_HEAPSIZE={{hive_heapsize}} # Setting for HiveServer2 and Client\n" +
          "fi\n" +
          "\n" +
          "export HADOOP_CLIENT_OPTS=\"$HADOOP_CLIENT_OPTS  -Xmx${HADOOP_HEAPSIZE}m\"\n" +
          "\n" +
          "# Larger heap size may be required when running queries over large number of files or partitions.\n";
  Assert.assertEquals(expectedResult, upgradeCatalog220.updateHiveEnvContentHDP23(testContent));
}