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

# Assert That Event Processor

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

The Assert That event processor allows you to run assertions to validate the state of a Mule event’s
content. You can use the Assert That processor to validate the Mule event after the 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/2.3/munit-matchers) for more information.

If these assertion fails, the processor throws a `java.lang.AssertionError`.

## See Also

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