### Question:
ExcelDataSource extends BaseDataSource { @Override public boolean hasMoreData(final String dataSetKey) { for (ExcelFile excelFile : getExcelFiles()) { Map<String, List<Map<String, String>>> data = excelFile.getData(); List<Map<String, String>> dataList = data.get(dataSetKey); if (dataList != null) { MutableInt counter = dataSetIndices.get(dataSetKey); int size = dataList.size(); return counter == null && size > 0 || size > counter.getValue(); } } return false; } @Inject  ExcelDataSource(final Configuration configuration, final DataFormatter dataFormatter); @Override boolean hasMoreData(final String dataSetKey); @Override void doReset();  }### Answer:
@Test public void testHasMoreData() { ExcelDataSource dataSource = createDataSource("src/test/resources/rowbased.xlsx", DataOrientation.rowbased); String dataSetKey = "sheet_0"; for (int i = 0; i < 3; ++i) { if (dataSource.hasMoreData(dataSetKey)) { dataSource.getNextDataSet(dataSetKey); } } assertThat(dataSource.hasMoreData(dataSetKey)).describedAs("no more data should be available").isFalse(); }