Datasets grp = new Datasets();
grp.add(ds0);
grp.add(ds1);
grp.add(ds2);
MutableDatasetND removedDataset = (MutableDatasetND)grp.remove(1);
// verify the removed element corresponds to the index
assertTrue(ds1 == removedDataset);
// verify the new size of the container
assertEquals(2, grp.size());