Question: * We are using `Spring boot 2.1.6` and for test purposes we have added `spring boot starter test 2.1.6`
* `spring boot starter test 2.1.6` comes with `JUnit4`
* We are planning to use `JUnit5`

**Question:**

* How would I know which `spring boot starter test` version using Junit5 will be compatible with `Spring boot 2.1.6`?

Answer: 
The Spring Boot 2.1.x versions are [no longer supported](https://github.com/spring-projects/spring-boot/wiki/Supported-Versions). Spring Boot 2.2 and higher uses JUnit 5 by default according to [the release notes](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2-Release-Notes#junit-5).
You can exclude JUnit-4 from spring boot starter tester:

```
<exclusions>
            <exclusion>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
            </exclusion>
        </exclusions>

```

and use JUnit5 there is no problem with your spring boot version at all.
Remember JUnit 5 use a different package (`org.junit.jupiter`).