Migrate expectEventsMatching to Axon Framework 5's eventsMatch

Proprietary

Axon Framework 5's test fixture checks the published events with eventsMatch(Predicate) where Axon Framework 4 took a Hamcrest matcher in expectEventsMatching(Matcher). This turns .expectEventsMatching(matcher) on a then() phase into .eventsMatch(matcher::matches). Axon Framework 5 still has the matchers of org.axonframework.test.matchers.Matchers.

io.moderne.axon.MigrateExpectEventsMatching
mod run . --recipe=io.moderne.axon.MigrateExpectEventsMatching

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.