Our project is moving to SpringBoot 2 (using spring-starter-test) and Mockito 3.x . In the integration tests, I converted the beans from @Mock to @MockBean annotation , remo