BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
10 / 18 · Module 13 — MUnit · filtered: cheatsheet← prev⊞ allnext →

13.26Assert entire objects

You can compare the entire payload:

<munit-tools:assert-that
    expression="#[payload]"
    is="#[
      MunitTools::equalTo({
        customerId: 'C001',
        salesforceId: '001ABC',
        success: true
      })
    ]"/>

For small stable structures, that's fine.

For larger payloads, asserting every irrelevant field creates brittle tests.