Package org.springframework.test.context.bean.override.mockito
@NonNullApi
@NonNullFields
package org.springframework.test.context.bean.override.mockito
Bean overriding mechanism based on Mockito mocking and spying.
-
ClassDescription
@MockitoBeanis an annotation that can be applied to a field in a test class to override a bean in the test'sApplicationContextusing a Mockito mock.TestExecutionListenerthat resets any mock beans that have been marked with aMockReset.Mark a field to trigger a bean override using a Mockito spy, which will wrap the original bean instance.Reset strategy used on a mock bean.AMockResolverfor testing Spring applications with Mockito.