Mocking Singleton does not work even when using @MockitoConfig(convertScopes = true) #35071
Unanswered
denysandriyanov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to mock RecoveryService, it's scope is @singleton.
Before Quarkus update i was using
@InjectMock(convertScopes=true)
and it worked
Now, I try to mock it like that
and still getting:
Invalid use of io.quarkus.test.InjectMock - the injected bean does not declare a CDI normal scope but: jakarta.inject.Singleton
Please help.
Beta Was this translation helpful? Give feedback.
All reactions