Use custom ObjectMapper + Spin in unit tests

Hi,

we use Camunda+Spring Boot (version 7.13.3). We have customized our ObjectMapper in our application by registering new modules to it.
This works fine in the service itself, but when it comes to testing, we do not want to “spin” up the whole Application Context just to test a delegate (for example). So we tried to generate a simple unit test, that will cover it, but didn’t manage to register our ObjectMapper in Spin, which is used in the class that is tested.

We tried to use a DataFormatConfigurator, but we then have to add hundreds of classes by hand. So is there an easier way of registering the custom ObjectMapper in Spin in a unit test?

Best regards,
Andreas