@Test
public void exceptionThrown_whenFirstLineHasLessFieldsThanHeader() throws Exception {

    //Header with 2 fields, 1st row missing comma -> has only 1 field
    final String CSV_DATA = "'Name','Age'\n'Jan''15'";
    CSVFileStorage mockStorage = new MockCSVFileStorage(CSV_DATA);
    CSVParser testedParser = new CSVParser(csvDataSet, mockStorage);
    try {
        DataSet dataSetShouldNotLoad = testedParser.load();
        Assert.fail("IllegalArgumentException should be thrown when 1st row of CSV data has less fields than the header");
    } catch (IllegalArgumentException iae) {
        String expectedExceptionMessage = "CSV parse error : The first row has fewer columns (1) than the header (2)";
        assertEquals(expectedExceptionMessage, iae.getMessage());
    }
}