'``set_maximum_size`` returns a ``Deferred` that fires with a
``Volume`` that has the new size set on it.'

def test_set_maximum_size(self):

    pool = FilesystemStoragePool(FilePath(self.mktemp()))
    service = VolumeService(FilePath(self.mktemp()), pool, reactor=Clock())
    service.startService()
    d = service.create(service.get(MY_VOLUME))
    volume_size = VolumeSize(maximum_size=((1024 * 1024) * 10))
    resized_volume = Volume(node_id=service.node_id, name=MY_VOLUME, service=service, size=volume_size)
    d = service.set_maximum_size(service.get(MY_VOLUME, size=volume_size))
    self.assertEqual(self.successResultOf(d), resized_volume)
