### Question:
ContainerDataSource implements DataSource { @Override public DataSet getNextDataSet(final String key) { List<? extends DataSource> dataSources = dataSourcesProvider.get(); for (DataSource ds : dataSources) { DataSet data = ds.getNextDataSet(key); if (data != null) { return data; } } return null; } @Inject  ContainerDataSource(final Provider<List<? extends DataSource>> dataSourcesProvider); @Override DataSet getNextDataSet(final String key); @Override DataSet getCurrentDataSet(final String key); @Override Map<String, DataSet> getCurrentDataSets(); @Override boolean hasMoreData(final String dataSetKey); @Override void resetFixedValue(final String dataSetKey, final String entryKey); @Override void resetFixedValues(final String dataSetKey); @Override void resetFixedValues(); @Override void setFixedValue(final String dataSetKey, final String entryKey, final String value); @Override String getName(); @Override void copyDataSetKey(final String key, final String newKey); @Override void removeDataSet(final String key); @Override String toString(); @Override void reset();  }### Answer:
@Test public void testDataSetsAvailable() { DataSet data1 = ds.getNextDataSet("test1"); Assert.assertNotNull(data1); DataSet data2 = ds.getNextDataSet("test2"); Assert.assertNotNull(data2); }
@Test public void testDataSetNotAvailable() { DataSet data = ds.getNextDataSet("test3"); Assert.assertNull(data); }