def test_make_file_with_content(self):
        """Ensure file creation with content sends corrent notifications."""
        name = 'filename'
        hash = self.factory.get_fake_hash()
        storage_key = uuid.uuid4()
        crc = 12345
        size = 111111111
        deflated_size = 10000
        magic_hash = b'magic_hash'
        with fsync_commit():
            n = self.vgw.make_file_with_content(
                self.root.id, name, hash, crc, size, deflated_size,
                storage_key, magic_hash=magic_hash)
        self.assertEqual(self.dummy_notifier.notifications, [
            VolumeNewGeneration(self.user.id, None, n.generation,
                                self.vgw.session_id)
        ])