'The ``Deferred`` returned by ``Filesystem.snapshots`` fires with a
``list`` of ``Snapshot`` instances corresponding to the snapshots that
exist for the ZFS filesystem to which the ``Filesystem`` instance
corresponds.'

def test_snapshots(self):

    expected_names = ['foo', 'bar']
    pool = build_pool(self)
    service = service_for_pool(self, pool)
    volume = service.get(MY_VOLUME)
    creating = pool.create(volume)
    def created(filesystem):
        self.filesystem = filesystem
        return cooperate((zfs_command(reactor, ['snapshot', u'{}@{}'.format(filesystem.name, name).encode('ascii')]) for name in expected_names)).whenDone()
    snapshotting = creating.addCallback(created)
    def snapshotted(ignored):
        return self.filesystem.snapshots()
    loading = snapshotting.addCallback(snapshotted)
    def loaded(snapshots):
        self.assertEqual(list((Snapshot(name=name) for name in expected_names)), snapshots)
    loading.addCallback(loaded)
    return loading
