I'm building a custom starter library which registers an ObjectMapper in a WebMvcConfigurer class. One of the settings on this ObjectMapper is an Instant serialization format.
When I use @SpringBootTest with @AutoConfigureMockMvc the configured ObjectMapper is picked up, and everything works as expected. However the same assertions using @WebMvcTest fail. It seems like the WebMvcConfigurer class is not being picked up in the @WebMvcTest autoconfiguration, although the docs state that it should be picked up.
Is there a way to extend the autoconfiguration for WebMvcTest's without having to resort to putting @Import with every @WebMvcTest annotation?