def METHOD_NAME(self):
    test_start = self.instance_in_pipeline.id - 1
    test_end = self.instance_in_pipeline.id + 1
    result = migrate_instance(test_start, test_end)
    kwargs = dict(
        instance_id=self.pipeline_instance.id,
        task_instance_id=self.taskflow_instance.id,
        atom_total=self.instance_in_pipeline.atom_total,
        subprocess_total=self.instance_in_pipeline.subprocess_total,
        gateways_total=self.instance_in_pipeline.gateways_total,
        project_id=self.taskflow_instance.project.id,
        category=self.task_template.category,
        template_id=self.pipeline_template.id,
        task_template_id=self.task_template.id,
        creator=self.pipeline_instance.creator,
        create_time=self.pipeline_instance.create_time,
        start_time=self.pipeline_instance.start_time,
        finish_time=self.pipeline_instance.finish_time,
        elapsed_time=calculate_elapsed_time(self.pipeline_instance.start_time, self.pipeline_instance.finish_time),
        create_method=self.taskflow_instance.create_method,
    )
    TaskflowStatistics.objects.filter.assert_called_once_with(instance_id=kwargs["instance_id"])
    TaskflowStatistics.objects.create.assert_called_once_with(**kwargs)
    self.assertTrue(result)