def METHOD_NAME(self):
    invoice = self.env["account.move"].create(
        {"partner_id": self.env["res.partner"].search([], limit=1).id}
    )
    comp = self.backend._get_component(self.record, "process")
    mock_1 = mock.patch.object(type(self.wiz_model), "import_invoice")
    self.assertFalse(self.record.record)
    # Simulate the wizard detected an existing invoice state
    with mock_1 as md_btn:
        md_btn.return_value = {"res_id": invoice.id}
        res = comp.process()
        md_btn.assert_called()
        self.assertEqual(res, f"Invoice {invoice.name} created")
    self.assertEqual(self.record.record, invoice)