'Receiving creates filesystem with the given push data.'

def test_receive_creates_files(self):

    pool = FilesystemStoragePool(FilePath(self.mktemp()))
    service = VolumeService(FilePath(self.mktemp()), pool, reactor=Clock())
    service.startService()
    volume = self.successResultOf(service.create(service.get(MY_VOLUME)))
    filesystem = volume.get_filesystem()
    filesystem.get_path().child('afile').setContent('lalala')
    manager_node_id = unicode(uuid4())
    new_name = VolumeName(namespace=u'myns', dataset_id=u'newvolume')
    with filesystem.reader() as reader:
        service.receive(manager_node_id, new_name, reader)
    new_volume = Volume(node_id=manager_node_id, name=new_name, service=service)
    root = new_volume.get_filesystem().get_path()
    self.assertTrue(root.child('afile').getContent(), 'lalala')
