Gradle: upgrade to JUnit5
Gradle: upgrade to JUnit5

Gradle uses JUnit 4.12 for testing which is an older version of JUnit.

Let's upgrade to JUnit 5. To use JUnit 5, we need to add in additional
dependencies junit-jupiter-api and junit-jupiter-engine.
Junit-jupiter-engine is used to execute the JUnit 5 tests during
runtime, while junit-jupiter-api provides the api required for writing
tests. Also, we need to use JUnit Platform, which is how Gradle
enables JUnit to run tests using its engine.

JUnit 5 has a few differences with JUnit 4, which means the tests will
need to be changed to run on the JUnit 5 engine. Some examples of
differences between JUnit5 and JUnit4 tests:
1. Different imports. (e.g. org.junit.jupiter.api.Test instead of
org.junit.Test)
2. Test cannot be used for specifying expectations. We use this to
specify timeout in `PersonListPanelTest`. Instead we should now use
assertTimeoutPreemptively
3. @Before is renamed to @BeforeEach
4. @After is renamed to @AfterEach
5. @BeforeClass is renamed to @BeforeAll
6. @AfterClass is renamed to @AfterAll
7. We can group assertions together using assertAll
8. @Rule and @ClassRule are not used in JUnit5. Instead, we need to
@ExtendWith, which generally requires creating an extension class.

Let's enable legacy support for JUnit 4 tests. By adding
junit-vintage-engine as a dependency, JUnit 4 tests can be run
normally.

se-edu/addressbook-level3