@MockBean on feign client is not working #22229
Labels
for: external-project
For an external project and not something we can fix
status: duplicate
A duplicate of another issue
The update to 2.2.7 seems to have broken the support of MockBean for interfaces it seems.
I tried mocking a Feign client with MockBean but the real Feign client is used instead of my mock, so the test fails.
I have create a sample project showcasing the issue with springmockk (which ported this change) and mockito: https://github.com/hikaru-shindo/springmokk-mockkbean-feign-error-example
Downgrading springmockk to 2.0.1 (not part of THIS report) and Spring Boot to 2.2.6 (for mockito test) will make the tests pass.
My bug report to springmockk suggests the problematic change is in b9c2b7b.
The text was updated successfully, but these errors were encountered: