What's the recommended way to start and gracefully shutdown a Spring application within a unit test? I am aware of the SpringExtension for JUnit5, but that starts and stops the Spring context before/after the test method execution.
I would like to start and stop the spring context withing the test method as I would like to verify that certain methods are called (especially during shutdown).
Is there a recommended way how to achieve that?