'``ResizeVolume.run`` changes the maximum size of the named volume.'

def test_sets_size(self):

    size = VolumeSize(maximum_size=1234567890)
    volume_service = create_volume_service(self)
    volume_name = VolumeName(namespace=u'default', dataset_id=u'myvol')
    volume = volume_service.get(volume_name)
    d = volume_service.create(volume)
    def created(ignored):
        dataset = Dataset(dataset_id=volume_name.dataset_id, maximum_size=size.maximum_size)
        change = ResizeDataset(dataset=dataset)
        deployer = P2PManifestationDeployer(u'example.com', volume_service)
        return change.run(deployer, state_persister=InMemoryStatePersister())
    d.addCallback(created)
    def resized(ignored):
        return volume_service.pool.enumerate()
    d.addCallback(resized)
    def got_filesystems(filesystems):
        (filesystem,) = filesystems
        self.assertEqual(size, filesystem.size)
    d.addCallback(got_filesystems)
    return d
