We recently had to create new versions of certain events. As such we also had to write an event upcaster. Now we were wondering how to create tests for upcasters.
We have been experimenting with creating a GenericMessage with the payload of a version 1.0 event and delivering this to the aggregate, but it doesn’t seem possible to attach the upcaster to the FixtureConfiguration of our unit tests.
Perhaps this is not so strange since the upcaster seems to be tightly coupled with database access when looking at the required spring boot configuration on https://docs.axonframework.org/part3/repositories-and-event-stores.html
But what other options does that leave us?