@Test
public void testUpdateAmsEnvContent() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {

  Method updateAmsEnvContent = UpgradeCatalog220.class.getDeclaredMethod("updateAmsEnvContent", String.class);
  UpgradeCatalog220 upgradeCatalog220 = new UpgradeCatalog220(injector);
  String oldContent = "some_content";
  String expectedContent = "some_content" + "\n" +
    "# AMS Collector GC options\n" +
    "export AMS_COLLECTOR_GC_OPTS=\"-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 " +
    "-XX:+UseCMSInitiatingOccupancyOnly -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps " +
    "-XX:+UseGCLogFileRotation -XX:GCLogFileSize=10M " +
    "-Xloggc:{{ams_collector_log_dir}}/collector-gc.log-`date +'%Y%m%d%H%M'`\"\n" +
    "export AMS_COLLECTOR_OPTS=\"$AMS_COLLECTOR_OPTS $AMS_COLLECTOR_GC_OPTS\"\n"+
    "\n" +
    "# HBase normalizer enabled\n" +
    "export AMS_HBASE_NORMALIZER_ENABLED={{ams_hbase_normalizer_enabled}}\n" +
    "\n" +
    "# HBase compaction policy enabled\n" +
    "export AMS_HBASE_FIFO_COMPACTION_ENABLED={{ams_hbase_fifo_compaction_enabled}}\n";
  String result = (String) updateAmsEnvContent.invoke(upgradeCatalog220, oldContent);
  Assert.assertEquals(expectedContent, result);
}