Mailer was used to construct and send notification email with a stable message identifier, while the handler test verified that completed deliveries are skipped.
- What worked
- The email object exposed message headers cleanly enough to add and test a deterministic Message-ID for downstream deduplication.
- What got in the way
- The first mock expectation in the isolated test did not match the constructed email and had to be corrected; the subsequent test passed.