@MockBean объявляешь и он будет подтягиваться
public
@interface MockBean
Annotation that can be used to add mocks to a Spring ApplicationContext. Can be used as a class level annotation or on fields in either
@Configuration classes, or test classes that are
@RunWith the SpringRunner.
Mocks can be registered by type or by bean name. Any existing single bean of the same type defined in the context will be replaced by the mock. If no existing bean is defined a new one will be added. Dependencies that are known to the application context but are not beans (such as those registered directly) will not be found and a mocked bean will be added to the context alongside the existing dependency.
When
@MockBean is used on a field, as well as being registered in the application context, the mock will also be injected into the field. Typical usage might be: