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

  Method updateAmsHbaseEnvContent = UpgradeCatalog220.class.getDeclaredMethod("updateAmsHbaseEnvContent", String.class);
  UpgradeCatalog220 upgradeCatalog220 = new UpgradeCatalog220(injector);
  String oldContent = "export HBASE_CLASSPATH=${HBASE_CLASSPATH}\n" +
    "\n" +
    "# The maximum amount of heap to use, in MB. Default is 1000.\n" +
    "export HBASE_HEAPSIZE={{hbase_heapsize}}\n";
  String expectedContent = "export HBASE_CLASSPATH=${HBASE_CLASSPATH}\n" +
    "\n" +
    "# The maximum amount of heap to use, in MB. Default is 1000.\n" +
    "#export HBASE_HEAPSIZE={{hbase_heapsize}}\n" +
    "\n" +
    "# The maximum amount of heap to use for hbase shell.\n" +
    "export HBASE_SHELL_OPTS=\"-Xmx256m\"\n";
  String result = (String) updateAmsHbaseEnvContent.invoke(upgradeCatalog220, oldContent);
  Assert.assertEquals(expectedContent, result);
}