Migrate the remaining JUnit 4 tests to JUnit 5, making use of the new `ModifiedClassPathExtension`. See gh-17491