Contact Us 1-800-596-4880

MUnit Verify Event Processor

logo acb active Anypoint Code Builder

logo studio active Anypoint Studio

The MUnit Verify event processor validates that a specified event processor was called a certain number of times during a MUnit test. Use it to confirm that your flow executed the expected processors with the expected attributes, even without creating a mock for them.

<munit-tools:verify-call processor="http:request" atLeast="1">
   <munit-tools:with-attributes>
       <munit-tools:with-attribute attributeName="method" whereValue="#['GET']" />
   </munit-tools:with-attributes>
</munit-tools:verify-call>
Attribute Name Description

eventProcessor

Describes which event processor you want to mock. The description takes the form {name-space}:{event-processor-name}. It supports regular expressions.

times

(Default = 1.) Defines the verification as successful if the event processor was called N and only N number of times.

atLeast

Defines the verification as successful if the event processor was called a minimum of N number of times.

atMost

Defines the verification as successful if the event processor was called maximum of N number of times.

The attributes times, atLeast, atMost, are mutually exclusive.

The eventProcessor attribute accepts regular expressions. For example, you can create the same verification as .*:request to verify for an event processor named request, disregarding which namespace the event processor belongs to. The regular expression language is the same as Java.