Closed as not planned
Closed as not planned
Description
When switching from using @MockBean
annotation to @MockitoBean
in one of our projects, I have found some inconsistency between the two, if @PostConstruct
annotation is being used along with MockReset.NONE
. Here is the minimal reproductive example.
I suspect, that there was some change in the time when resetting the mocks happen - for some reason @MockitoBean
is being reset after @PostConstruct
is resolved, even though the MockReset.NONE
is being used for its configuration - this is not a case for @MockBean
.