public void testListSnapshots() {
Set<? extends Snapshot> snapshots = snapshotApi.list().toSet();
assertNotNull(snapshots);
boolean foundIt = false;
for (Snapshot snap : snapshots) {
Snapshot details = snapshotApi.get(snap.getId());
if (Objects.equal(snap.getVolumeId(), testVolume.getId())) {
foundIt = true;
}
assertNotNull(details);
assertEquals(details.getId(), snap.getId());
assertEquals(details.getVolumeId(), snap.getVolumeId());
}
assertTrue(foundIt, "Failed to find the snapshot we previously created in listSnapshots() response");
}