@Test
public void testConvertCheckOutputDir() throws Exception {

  FSConfigToCSConfigConverterParams params = createDefaultParamsBuilder()
      .withClusterResource(CLUSTER_RESOURCE_STRING)
      .withConvertPlacementRules(true)
      .build();
  converter.convert(params);
  Configuration conf =
      getConvertedCSConfig(FSConfigConverterTestCommons.OUTPUT_DIR);
  File capacityFile = new File(FSConfigConverterTestCommons.OUTPUT_DIR,
      "capacity-scheduler.xml");
  assertTrue("Capacity file exists", capacityFile.exists());
  assertTrue("Capacity file length > 0", capacityFile.length() > 0);
  assertTrue("No. of configuration elements > 0", conf.size() > 0);
  File yarnSiteFile = new File(FSConfigConverterTestCommons.OUTPUT_DIR,
      "yarn-site.xml");
  assertTrue("Yarn site exists", yarnSiteFile.exists());
  assertTrue("Yarn site length > 0", yarnSiteFile.length() > 0);
  File mappingRulesFile = new File(FSConfigConverterTestCommons.OUTPUT_DIR,
      "mapping-rules.json");
  assertTrue("Mapping rules file exists", mappingRulesFile.exists());
  assertTrue("Mapping rules file length > 0", mappingRulesFile.length() > 0);
}