The root package of bean override (org.springframework.test.context.bean.override) does not provide a simple implementation so some tests are relying on ExampleBeanOverrideAnnotation. This "test" implementation is doing a lot of things internally and I am not sure it should.

Its usage is now restricted to BeanOverrideBeanFactoryPostProcessorTests which could use something a bit more simpler certainly.

Comment From: snicoll

Case in point, TestOverrideMetadata is actually hiding a bug, see https://github.com/spring-projects/spring-framework/issues/32990. I found out when adapting this test to a vanilla implementation that doesn't do anything fancy.