The default "expectEvent(s)" does an equals comparison of the caught events and passed expected events, which fails when values are set in the commandhandler that are not under control of the caller (generated aggregateId, generated timestamps, ...).
Idea: capture the actual events as in mockitos ArgumentCaptor and then assert manually on that list of events.
The default "expectEvent(s)" does an equals comparison of the caught events and passed expected events, which fails when values are set in the commandhandler that are not under control of the caller (generated aggregateId, generated timestamps, ...).
Idea: capture the actual events as in mockitos ArgumentCaptor and then assert manually on that list of events.