def setup_volume(self):
        """Setup the volume used for this test case."""
        self.gw = SystemGateway()
        user = self.factory.make_user(max_storage_bytes=2000)
        self.user = self.gw.get_user(user.id, session_id='QWERTY')
        self.owner = self.user
        # make a test file in the database
        udf = self.factory.make_user_volume(
            owner=user, path='~/thepath/thename')
        udf_dao = DAOUserVolume(udf, self.user)
        self.vgw = ReadWriteVolumeGateway(self.user, udf=udf_dao)
        self.root = StorageObject.objects.get(id=self.vgw.get_root().id)
        self.file = self.root.make_file(
            'TheName', content_blob=self.factory.make_content_blob(),
            mimetype='fakemime')