@Test
public void testConvertFSConfigurationWithConsoleParam()
    throws Exception {

  setupFSConfigConversionFiles(true);
  ArgumentCaptor<FSConfigToCSConfigConverterParams> conversionParams =
      ArgumentCaptor.forClass(FSConfigToCSConfigConverterParams.class);
  FSConfigToCSConfigArgumentHandler argumentHandler =
      createArgumentHandler();
  String[] args = getArgumentsAsArrayWithDefaults("-f",
      FSConfigConverterTestCommons.FS_ALLOC_FILE,
      "-r", FSConfigConverterTestCommons.CONVERSION_RULES_FILE, "-p");
  argumentHandler.parseAndConvert(args);
  // validate params
  verify(mockConverter).convert(conversionParams.capture());
  FSConfigToCSConfigConverterParams params = conversionParams.getValue();
  LOG.info("FS config converter parameters: " + params);
  assertEquals("Yarn site config",
      FSConfigConverterTestCommons.YARN_SITE_XML,
      params.getYarnSiteXmlConfig());
  assertEquals("FS xml", FSConfigConverterTestCommons.FS_ALLOC_FILE,
      params.getFairSchedulerXmlConfig());
  assertEquals("Conversion rules config",
      FSConfigConverterTestCommons.CONVERSION_RULES_FILE,
      params.getConversionRulesConfig());
  assertTrue("Console mode", params.isConsole());
}