### Question:
CsvDataSource extends BaseDataSource { @Override public boolean hasMoreData(final String dataSetKey) { if (getCsvFiles().containsKey(dataSetKey)) { CsvFile csvFile = getCsvFiles().get(dataSetKey); if (csvFile.lines == null) { try { csvFile.load(); } catch (IOException e) { throw new IllegalArgumentException("Could not load CSV file " + csvFile.fileName, e); } } return csvFile.hasNextLine(); } return false; } @Inject  CsvDataSource(final Configuration configuration); @Override boolean hasMoreData(final String dataSetKey); @Override void doReset();  }### Answer:
@Test public void testHasMoreData() { int i = 0; while (ds.hasMoreData("bar")) { ds.getNextDataSet("bar"); ++i; } Assert.assertEquals(i, 2); i = 0; while (ds.hasMoreData("foo")) { ds.getNextDataSet("foo"); ++i; } Assert.assertEquals(i, 2); }