Junit 5 with Spring Boot: When to use @ExtendWith Spring or ...
stackoverflow.com › questions › 61433806Apr 26, 2020 · Junit 5 with Spring Boot: When to use @ExtendWith Spring or Mockito? I Have the following abstract unit test class that all my concrete unit test classes extend: @ExtendWith (SpringExtension.class) //@ExtendWith (MockitoExtension.class) @SpringBootTest ( classes = PokerApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT ) public abstract class AbstractUnitTests { @MockBean public RoundService roundService; @MockBean public RoundRepository roundRepository; }