Spring Framework 6.2.0-M1: Overriding Beans in Tests
Spring Framework 6.2.0-M1
has been released, including changes that resolve more than one hundred issues. Among those are a range of new features in Spring's testing support.
In this post, I’d like to walk you through one of these new testing features: Bean Overriding support.
The previous state of affairs
Using the Spring TestContext Framework, you can easily verify the correct wiring of your Spring application within integration tests using an annotation-driven model.
In unit testing, dependency injection and Spring design principles make your code less dependent on the container and make it…