public static void main(String[] args) {
    try {
      FSConfigToCSConfigArgumentHandler fsConfigConversionArgumentHandler =
          new FSConfigToCSConfigArgumentHandler();
      int exitCode =
          fsConfigConversionArgumentHandler.parseAndConvert(args);
      if (exitCode != 0) {
        LOG.error(FATAL,
            "Error while starting FS configuration conversion, " +
                "see previous error messages for details!");
      }

      exitFunction.accept(exitCode);
    } catch (Throwable t) {
      LOG.error(FATAL,
          "Error while starting FS configuration conversion!", t);
      exitFunction.accept(-1);
    }
  }
@Test
  public void testConvertFSConfigurationWithConsoleParam()
      throws Exception {
    setupFSConfigConversionFiles();

    FSConfigToCSConfigConverterMain.main(new String[] {
        "-p",
        "-e",
        "-y", YARN_SITE_XML,
        "-f", FS_ALLOC_FILE,
        "-r", CONVERSION_RULES_FILE});

    String stdout = converterTestCommons.getStdOutContent().toString();
    assertTrue("Stdout doesn't contain yarn-site.xml",
        stdout.contains("======= yarn-site.xml ======="));
    assertTrue("Stdout doesn't contain capacity-scheduler.xml",
        stdout.contains("======= capacity-scheduler.xml ======="));
    assertTrue("Stdout doesn't contain mapping-rules.json",
        stdout.contains("======= mapping-rules.json ======="));
    assertEquals("Exit code", 0, exitFunc.exitCode);
  }