BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
180 / 278 · Module 13 — MUnit · filtered: code← prev⊞ allnext →

13.5Set Event

First we need to create the Mule event that our production flow receives.

Conceptually:

<munit:set-event>

    <munit:payload
        value='#[{
            customerId: "C001",
            companyName: "Acme"
        }]'
        mediaType="application/json"/>

</munit:set-event>

Think:

const request = {
    customerId: "C001",
    companyName: "Acme"
};

MUnit provides dedicated processors for setting, mocking, validating, and asserting Mule events.