According to next video by John Thompson
Useful Baeldung article
import org.junit.Test;
@RunWith(SpringRunner.class)
@SpringBootTest
public class AppTest {
@Test
public void contextLoads() {
}
}<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>import org.junit.jupiter.api.Test;
@ExtendWith(SpringExtension.class)
@SpringBootTest
public class AppTest {
@Test
public void contextLoads() {
}
}<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies><build>
<plugins>
<plugin>
<artifactId>maven-surefire-provider</artifactId>
<version>2.22.0</version>
<dependencies>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit-platform.version}</version>
</dependencies>
</plugin>
</plugins>
</build>