def METHOD_NAME(self):
    submission = SubmissionFactory.create(
        form__registration_backend="email",
        form__registration_backend_options={
            # "to_emails": ["foo@bar.baz"], # Missing required to_emails parameter
        },
        completed_not_preregistered=True,
    )
    self.assertEqual(submission.public_registration_reference, "")
    with patch(
        "openforms.submissions.public_references.generate_unique_submission_reference",
        return_value="OF-test-registration-failure",
    ):
        pre_registration(submission.id)
    submission.refresh_from_db()
    self.assertEqual(
        submission.public_registration_reference, "OF-test-registration-failure"
    )
    self.assertFalse(submission.pre_registration_completed)