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 used in test classes to override a bean in the test'sApplicationContextwith a Mockito mock.Container for@MockitoBeanannotations which allows@MockitoBeanto be used as a repeatable annotation at the type level — for example, on test classes or interfaces implemented by test classes.TestExecutionListenerthat resets any mock beans that have been marked with aMockReset.@MockitoSpyBeanis an annotation that can be used in test classes to override a bean in the test'sApplicationContextwith a Mockito spy that wraps the original bean instance.Container for@MockitoSpyBeanannotations which allows@MockitoSpyBeanto be used as a repeatable annotation at the type level — for example, on test classes or interfaces implemented by test classes.Reset strategy used on a mock bean.AMockResolverfor testing Spring applications with Mockito.