I upgraded from 2.2.5 to 2.3.0. We have a @SpringBootTest that uses @MockBean on a @FeignClient. With 2.2.5, we were able to Mockito.when(...) to make the FeignClient return what we wanted in that specific test. After upgrading to 2.3.0, the @MockBean doesn't seem to work correctly: In debug mode I can see that in the test, we indeed have a Mockito mock for the client, in the tested code however it's not a mock but Spring's proxy thus crashing the test. The behaviour can be seen here https://github.com/N4zroth/spring-boot-feign-mockbean , the test fails with 2.3.0 but succeeds with 2.2.5. I'm quite sure that the previous behavior was correct and the new one is wrong. Correct me if I'm wrong, though.
Comment From: snicoll
Thanks for the report and the sample. This is a duplicate of #21379
Comment From: N4zroth
Ah sorry somehow that didn't come up on Google. Thanks!