CSVDataSource implements IDataSource { @Override public void loadFromStream(InputStream data) throws DataSourceException { setSource(new InputStreamReader(data)); }  @Override String[] getFieldNames(); @Override String getValueFor(String fieldName); @Override void setRow(int index); @Override void loadFromStream(InputStream data); @Override void close(); @ConfigurationOption(defaultValue = DEFAULT_SEPARATOR, description = "The separator used to divide two values within a row.") void setSeparator(String separator); @ConfigurationOption(defaultValue = "", description = "The column names, separated by commas, which shall be used for naming the data columns of the CSV file. Use this option, if the CSV file itself does not have the headers in its first row.") void setHeaders(String headerNames); @Override int getNumberOfRows();  }
@Test(expected = DataSourceException.class) public void testEmptyCSVFile() throws Exception { ds.loadFromStream(getStream("empty.csv")); }