@MockBean is a great tool for the test. It helps me to write a lot of more efficient test code. But my company has some projects which do use Spring Boot. So it can not use @MockBean.

Could you migrate @MockBean to Spring Framework?

Comment From: snicoll

Duplicate #18655

Comment From: sbrannen

Effectively superseded by #29917 which introduces support for @TestBean, @MockitoBean, and @MockitoSpyBean in the spring-test module in Spring Framework 6.2.