@Test
  public void testARG() {

    final String COUNTRY = "ARG";

    List<CSVRecord> records1 = csv1.groupCSVByCountry(COUNTRY);
    List<CSVRecord> records2 = csv2.groupCSVByCountry(COUNTRY);

    CSVParser parser = new CSVParser(COUNTRY, headers, records1, records2);
    parser.setPrettyHeader(csv1.getPrettyHeader(), csv2.getPrettyHeader());
    parser.toBasicValuesList();
  }
  @Before
  public void csvLoadingTest() throws FileNotFoundException, IOException {

    File file1 = TestData.file(this, "22_Aug_2014_P_version_for_FRIMS_update_entryItemAdded.csv");
    File file2 = TestData.file(this, "22_August_Annual_F_for_FRIMS_update_entryItemAdded.csv");
    csv1 = new CSVLoader(file1.getAbsolutePath());
    csv2 = new CSVLoader(file2.getAbsolutePath());

    assertNotNull(csv1.getHeader());
    assertNotNull(csv2.getHeader());
    headers = new LinkedHashSet<Map<String, Integer>>();
    headers.add(csv1.getHeader());
    headers.add(csv2.getHeader());

    assertEquals(1872, csv1.countCSVRecords());
    assertEquals(234, csv1.getCountries().size());
    assertEquals(6318, csv2.countCSVRecords());
    assertEquals(234, csv2.getCountries().size());
    List<CSVRecord> records1 = csv1.groupCSVByCountry("DZA");
    List<CSVRecord> records2 = csv2.groupCSVByCountry("DZA");
    anExampleRecordFromCSV1 = records1.get(7);
    anExampleRecordFromCSV2 = records2.get(9);
    csvParser = new CSVParser("DZA", headers, records1, records2);
    csvParser.setPrettyHeader(csv1.getPrettyHeader(), csv2.getPrettyHeader());
  }
 @Test
 public void evaluateHeadersTest() {
   Set<Map<String, Integer>> headerSet = csvParser.evaluateHeaders();
   assertEquals(2, headerSet.size());
   for (Map<String, Integer> map : headerSet) {
     assertTrue(!map.isEmpty());
   }
 }
 @Test
 public void toBasicValuesListTest() {
   // DZA loads:
   // -> 27 records with header size equal to 250 (minus 2 that are reserved)
   // -> 8 records with header size equal to 13 (minus 2 that are reserved)
   // -> about one hundred records are excluded due to the management of year 9999
   // But I have to load only Valorized cells!!! so -> 926
   assertEquals(926, csvParser.toBasicValuesList().size());
 }
 @Test
 public void findHeaderTest() {
   assertEquals(250, csvParser.findHeader(anExampleRecordFromCSV1).size());
   assertEquals(13, csvParser.findHeader(anExampleRecordFromCSV2).size());
 }