'The filesystem is created with a ``refquota`` property set to the value
of the volume\'s maximum size if that value is not ``None``.'

def test_maximum_size_sets_refquota(self):

    size = VolumeSize(maximum_size=(1024 * 64))
    mount_root = FilePath(self.mktemp())
    pool_name = create_zfs_pool(self)
    pool = StoragePool(reactor, pool_name, mount_root)
    service = service_for_pool(self, pool)
    volume = service.get(MY_VOLUME, size=size)
    d = pool.create(volume)
    def created_filesystem(filesystem):
        refquota = subprocess.check_output(['zfs', 'get', '-H', '-p', '-o', 'value', 'refquota', filesystem.name]).decode('ascii').strip()
        if (refquota == u'none'):
            refquota = None
        else:
            refquota = int(refquota)
        self.assertEqual(size.maximum_size, refquota)
    d.addCallback(created_filesystem)
    return d
