---
schema_version: "1"
id: 114dd7ea33e9f6ea30f4a9b6f35171035755d4f4de20ff908be44558ad927eef
title: MUnit Assert That Event Processor
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/munit/latest/assertion-event-processor.md
canonical_url: https://docs.mulesoft.com/munit/latest/assertion-event-processor
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c589b3a6410fc5bec22c8886d56b08836f2ed2deee026ea97e2c9ecc90216756
description: MuleSoft Documentation Site
release: "3.7"
latest: true
---
---
product: MUnit
version: 3.7
is-latest-version: true
keywords: mule, esb, tests, qa, quality assurance, verify, functional testing, unit testing, stress testing
---

# MUnit Assert That Event Processor

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

![logo acb active](/mulesoft/current/en-us/_/img/icons/anypoint-code-builder.svg "Anypoint Code Builder")Anypoint Code
Builder

![logo studio active](/mulesoft/current/en-us/_/img/icons/studio.svg "Anypoint Studio")Anypoint Studio

The MUnit Assert That event processor validates the state of a Mule event’s content during a MUnit
test using DataWeave MUnit matchers. Use it to assert conditions on any value in an expression after
production code runs.

The Assert That processor uses a set of DataWeave functions called `MUnit matchers` to define the
assertion conditions for any value in an expression.

For example, to assert that a payload is equal to a certain value, configure the Assert That
processor using the `equalTo()` matcher.

```xml
<munit-tools:assert-that
  expression="#[payload]"
  is="#[MunitTools::equalTo('example')]"
  message="The payload should be ‘example’"/>
```

Or you can also check if the payload is null using the `nullValue()` matcher.

```xml
<munit-tools:assert-that
  expression="#[payload]"
  is="#[MunitTools::nullValue()]"
  message="The payload should be null"/>
```

See [MUnit Matchers](https://docs.mulesoft.com/munit/latest/munit-matchers) for more information.

If these assertion fails, the processor throws a `MUNIT-TOOLS:ASSERTION_ERROR`.

## See Also

- [MUnit Matchers](https://docs.mulesoft.com/munit/latest/munit-matchers)
