Contact Free trial Login

About Assert That Event Processor

The Assert That Event Processor allows you to run assertions in order to validate the state of a Mule Event’s content.
This Event 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-That processor using the equalTo() matcher.

<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.

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

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

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.