Using Axon 3.1, I’d like to perform unit tests on aggregates by invoking methods directly on the aggregate and assert on the generated events.
I cannot annotate the command on the aggregate since it’s a generated code and I cannot add @TargetAggregateIdentifier
In any case, I rather use CommandHandlers that load and invoke methods on the aggregate.
In short, how can I unit test the aggregate by invoking it’s methods and assert on generated events?
(I was able to do so with Axon 2.4.x, where the aggregate used to inherit from AbstractAnnotatedAggregateRoot
Thanks for the help,