---
schema_version: "1"
id: 81e4008fec195c6ce95ff56ad59e9d42e46334fd059af04717be457dfb8b54db
title: Assert Equals
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/munit/2.3/assertion-equals-processor.md
canonical_url: https://docs.mulesoft.com/munit/2.3/assertion-equals-processor
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b68c40908bbcc4391f5c102447f4fa172886aee9fa5a60ecfc4b0a1c36ba6d5d
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: MUnit
version: 2.3
---

# Assert Equals

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

The Assert Equals processor allows you to run assertions in order to validate the state of a Mule
Event’s content. This processor can be used to validate the Mule Event after the production code
runs.

For example, to assert that a payload is equal to a certain value, you can configure the
Assert-Equals processor the following way:

```xml
<munit-tools:assert-equals
  actual="#[payload]"
  expected="#[2]"
  message="The payload should be 2"/>
```

If the `expected` attribute is a String, you can specify the literal value without requiring an
expression.

```xml
<munit-tools:assert-equals
  actual="#[payload]"
  expected="Example"
  message="The payload should be 'Example'"/>
```

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