Assert Equals

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:

  message="The payload should be 2"/>

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

  message="The payload should be 'Example'"/>

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

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub
Give us your feedback!
We want to build the best documentation experience for you!
Help us improve with your feedback.
Take the survey!