def test_move_notification_with_overwrite(self):
        """Make sure moves send the corrent notifications."""
        root_id = self.vgw.get_root().id
        name = 'filename'
        hash = self.factory.get_fake_hash()
        storage_key = uuid.uuid4()
        crc = 12345
        size = 111111111
        deflated_size = 10000
        with fsync_commit():
            dira1 = self.vgw.make_subdirectory(root_id, 'dira1')
            dira2 = self.vgw.make_subdirectory(dira1.id, 'dira2')
            self.vgw.make_file_with_content(
                dira1.id, name, hash, crc, size, deflated_size, storage_key)
        self.dummy_notifier.reset()
        with fsync_commit():
            n = self.vgw.move_node(dira2.id, root_id, 'dira1')
        # we get two generations, one for the delete and one for the move
        self.assertEqual(self.dummy_notifier.notifications, [
            VolumeNewGeneration(self.user.id, None, n.generation - 1,
                                self.vgw.session_id),
            VolumeNewGeneration(self.user.id, None, n.generation,
                                self.vgw.session_id),
        ])