BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
42 / 81 · Module 13 — MUnit · filtered: interview← prev⊞ allnext →

13.37Testing idempotency

This is very important.

At MUnit level, you can test:

same logical input
↓
flow twice

with mocked/persistent state as appropriate.

But real idempotency often depends on:

Salesforce unique External ID
database unique constraint
Object Store
message broker

So not all of it belongs in pure unit tests.

This leads to the key distinction:

MUnit proves your flow logic. Integration tests prove the real infrastructure semantics.