BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
953 / 1048 · Module 18 — Interview Coding Scenarios← prev⊞ allnext →

18.28Scenario 27 — MUnit negative test

Prompt:

“Test that an invalid customer does not call Salesforce.”

Conceptually:

Given:
customerId missing

When:
flow executes

Then:
APP:INVALID_CUSTOMER

AND:

Salesforce Upsert
called 0 times

This is an especially good test.

Because:

400 response

alone doesn't prove Salesforce wasn't already modified.