@Test
public void testCreate() {

    metadata.commit(() -> {
        DataSet dset = null;
        for (int srcIdx = 0; srcIdx < 2; srcIdx++) {
            for (int dsIdx = 1; dsIdx <= COUNT + 1; dsIdx++) {
                dset = createDataSet(this.dSrcIds.get(srcIdx), srcIdx * 10 + dsIdx);
            }
            
            this.dSetIds.add(dset.getId());
        }
    }, MetadataAccess.SERVICE);
    
    metadata.read(() -> {
        Optional<DataSet> dset0 = this.dataSetProvider.find(this.dSetIds.get(0));
        
        assertThat(dset0).isNotNull().isPresent();
        assertThat(dset0.get()).extracting("title", "description").contains(dataSetTuple(COUNT + 1).toArray());
        assertThat(dset0.get().getDataSource()).isNotNull().extracting("id").contains(this.dSrcIds.get(0));
        
        Optional<DataSet> dset1 = this.dataSetProvider.find(this.dSetIds.get(1));
        
        assertThat(dset1).isNotNull().isPresent();
        assertThat(dset1.get()).extracting("title", "description").contains(dataSetTuple(10 + COUNT + 1).toArray());
        assertThat(dset1.get().getDataSource()).isNotNull().extracting("id").contains(this.dSrcIds.get(1));
    }, MetadataAccess.SERVICE);
}