@BeforeEach
    void setup() {
        this.mockMvc = MockMvcBuilders
            .standaloneSetup(crashController)
            .setHandlerExceptionResolvers(simpleMappingExceptionResolver)
            .build();
    }
Test class for {@link CrashController}

@author Colin But
src/test/java/org/springframework/samples/petclinic/web/CrashControllerTests.java