Index: /trunk/ivy.xml
===================================================================
--- /trunk/ivy.xml	(revision 17275)
+++ /trunk/ivy.xml	(revision 17276)
@@ -45,5 +45,5 @@
         <dependency conf="sources->default" org="org.webjars.npm" name="tag2link" rev="2020.10.18"/><!-- sources->default sic! (tag2link-sources.jar is empty, see #19335) -->
         <!-- commonslang->default -->
-        <dependency conf="commonslang->default" org="org.apache.commons" name="commons-lang3" rev="3.10"/>
+        <dependency conf="commonslang->default" org="org.apache.commons" name="commons-lang3" rev="3.11"/>
         <!-- jacocoant->default -->
         <dependency conf="jacocoant->default" org="org.jacoco" name="org.jacoco.ant" rev="0.8.6">
@@ -52,10 +52,8 @@
         <dependency conf="jmockit->default" org="org.jmockit" name="jmockit" rev="1.49"/>
         <!-- test->default -->
-        <dependency conf="test->default" org="com.github.spotbugs" name="spotbugs-annotations" rev="4.0.1"/>
-        <dependency conf="test->default" org="com.github.stefanbirkner" name="system-rules" rev="1.19.0">
-            <exclude module="junit-dep" />
-        </dependency>
-        <dependency conf="test->default" org="com.github.tomakehurst" name="wiremock" rev="2.26.3"/>
-        <dependency conf="test->default" org="io.github.classgraph" name="classgraph" rev="4.8.67"/>
+        <dependency conf="test->default" org="com.github.spotbugs" name="spotbugs-annotations" rev="4.1.4"/>
+        <dependency conf="test->default" org="com.ginsberg" name="junit5-system-exit" rev="1.0.0"/>
+        <dependency conf="test->default" org="com.github.tomakehurst" name="wiremock" rev="2.27.2"/>
+        <dependency conf="test->default" org="io.github.classgraph" name="classgraph" rev="4.8.90"/>
         <dependency conf="test->default" org="org.junit.platform" name="junit-platform-launcher" rev="1.7.0"/>
         <dependency conf="test->default" org="org.junit.vintage" name="junit-vintage-engine" rev="5.7.0"/>
@@ -65,7 +63,7 @@
         <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-migrationsupport" rev="5.7.0"/>
         <dependency conf="test->default" org="net.trajano.commons" name="commons-testing" rev="2.1.0"/>
-        <dependency conf="test->default" org="nl.jqno.equalsverifier" name="equalsverifier" rev="3.4.3"/>
-        <dependency conf="test->default" org="org.apache.commons" name="commons-lang3" rev="3.10"/>
-        <dependency conf="test->default" org="org.awaitility" name="awaitility" rev="4.0.2"/>
+        <dependency conf="test->default" org="nl.jqno.equalsverifier" name="equalsverifier" rev="3.5"/>
+        <dependency conf="test->default" org="org.apache.commons" name="commons-lang3" rev="3.11"/>
+        <dependency conf="test->default" org="org.awaitility" name="awaitility" rev="4.0.3"/>
     </dependencies>
 </ivy-module>
Index: /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java
===================================================================
--- /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java	(revision 17275)
+++ /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java	(revision 17276)
@@ -28,10 +28,7 @@
 import javax.imageio.ImageIO;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.Bounds;
@@ -55,5 +52,4 @@
  * @author Michael Zangl
  */
-@RunWith(Parameterized.class)
 public class MapCSSRendererTest {
     private static final String TEST_DATA_BASE = "/renderer/";
@@ -71,6 +67,4 @@
     public JOSMTestRules test = new JOSMTestRules().preferences().projection();
 
-    private final TestConfig testConfig;
-
     // development flag - set to true in order to update all reference images
     private static final boolean UPDATE_ALL = false;
@@ -81,5 +75,4 @@
      * @return The parameters.
      */
-    @Parameters(name = "{1}")
     public static Collection<Object[]> runs() {
         return Stream.of(
@@ -169,18 +162,14 @@
 
     /**
+     * Run the test using {@code testConfig}
      * @param testConfig The config to use for this test.
      * @param ignored The name to print it nicely
+     * @throws Exception if an error occurs
      */
-    public MapCSSRendererTest(TestConfig testConfig, String ignored) {
-        this.testConfig = testConfig;
-    }
-
-    /**
-     * This test only runs on OpenJDK.
-     * It is ignored for other Java versions since they differ slightly in their rendering engine.
-     * @since 11691
-     */
-    @BeforeEach
-    public void forOpenJDK() {
+    @ParameterizedTest(name = "{1}")
+    @MethodSource("runs")
+    void testRender(TestConfig testConfig, String ignored) throws Exception {
+        // This test only runs on OpenJDK.
+        // It is ignored for other Java versions since they differ slightly in their rendering engine.
         String javaHome = System.getProperty("java.home");
         assumeTrue(javaHome != null && javaHome.toLowerCase(Locale.ENGLISH).contains("openjdk"), "Test requires openJDK");
@@ -190,12 +179,5 @@
             assumeTrue(fonts.contains(font), "Test requires font: " + font);
         }
-    }
-
-    /**
-     * Run the test using {@link #testConfig}
-     * @throws Exception if an error occurs
-     */
-    @Test
-    void testRender() throws Exception {
+
         // Force reset of preferences
         StyledMapRenderer.PREFERENCE_ANTIALIASING_USE.put(true);
Index: /trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
===================================================================
--- /trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 17275)
+++ /trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 17276)
@@ -23,4 +23,5 @@
 import java.util.Random;
 import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
 import java.util.logging.Logger;
 
@@ -28,6 +29,6 @@
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.rules.Timeout;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.TestUtils;
@@ -51,4 +52,5 @@
  */
 @SuppressFBWarnings(value = "CRLF_INJECTION_LOGS")
+@Timeout(value = 60, unit = TimeUnit.SECONDS)
 class MultiFetchServerObjectReaderTest {
     private static final Logger logger = Logger.getLogger(MultiFetchServerObjectReader.class.getName());
@@ -60,10 +62,4 @@
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
-
-    /**
-     * Global timeout applied to all test methods.
-     */
-    @RegisterExtension
-    public Timeout globalTimeout = Timeout.seconds(60);
 
     /**
Index: /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 17275)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 17276)
@@ -4,13 +4,15 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
-import org.junit.contrib.java.lang.system.ExpectedSystemExit;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.cache.JCSCacheManager;
 import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.io.SaveLayersDialog;
 import org.openstreetmap.josm.gui.progress.swing.ProgressMonitorExecutor;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.ImageProvider;
+
+import com.ginsberg.junit.exit.ExpectSystemExitWithStatus;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -32,16 +34,10 @@
 
     /**
-     * System.exit rule
-     */
-    @RegisterExtension
-    public final ExpectedSystemExit exit = ExpectedSystemExit.none();
-
-    /**
      * Unit test of {@link ExitAction#actionPerformed}
      */
     @Test
+    @ExpectSystemExitWithStatus(0)
     void testActionPerformed() {
         TestUtils.assumeWorkingJMockit();
-        exit.expectSystemExitWithStatus(0);
 
         boolean[] workerShutdownCalled = {false};
@@ -50,4 +46,5 @@
         boolean[] imageProviderShutdownCalledNowTrue = {false};
         boolean[] jcsCacheManagerShutdownCalled = {false};
+        boolean[] saveLayersDialogCloseDialogCalled = {false};
 
         // critically we don't proceed into the actual implementation in any of these mock methods -
@@ -89,4 +86,10 @@
             }
         };
+        new MockUp<SaveLayersDialog>() {
+            @Mock
+            private void closeDialog(Invocation invocation) {
+                saveLayersDialogCloseDialogCalled[0] = true;
+            }
+        };
 
         // No layer
@@ -102,4 +105,5 @@
             assertTrue(imageProviderShutdownCalledNowTrue[0]);
             assertTrue(jcsCacheManagerShutdownCalled[0]);
+            assertTrue(saveLayersDialogCloseDialogCalled[0]);
         }
     }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/RenderingCLIAreaTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/RenderingCLIAreaTest.java	(revision 17275)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/RenderingCLIAreaTest.java	(revision 17276)
@@ -12,8 +12,7 @@
 import org.hamcrest.CoreMatchers;
 import org.hamcrest.Matcher;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -25,5 +24,4 @@
  * Tests the method {@link RenderingCLI#determineRenderingArea(org.openstreetmap.josm.data.osm.DataSet)}.
  */
-@RunWith(Parameterized.class)
 class RenderingCLIAreaTest {
     /**
@@ -34,5 +32,4 @@
     public JOSMTestRules test = new JOSMTestRules().projection().territories();
 
-    @Parameterized.Parameters
     public static Collection<Object[]> runs() {
         Collection<Object[]> runs = new ArrayList<>();
@@ -149,18 +146,9 @@
     }
 
-    private final String[] args;
-    private final Matcher<Double> scaleMatcher;
-    private final Matcher<Bounds> boundsMatcher;
-
-    RenderingCLIAreaTest(String args, Matcher<Double> scaleMatcher, Matcher<Bounds> boundsMatcher) {
-        this.args = args.split("\\s+", -1);
-        this.scaleMatcher = scaleMatcher;
-        this.boundsMatcher = boundsMatcher;
-    }
-
-    @Test
-    void testDetermineRenderingArea() {
+    @ParameterizedTest
+    @MethodSource("runs")
+    void testDetermineRenderingArea(String args, Matcher<Double> scaleMatcher, Matcher<Bounds> boundsMatcher) {
         RenderingCLI cli = new RenderingCLI();
-        cli.parseArguments(args);
+        cli.parseArguments(args.split("\\s+", -1));
         RenderingCLI.RenderingArea ra = cli.determineRenderingArea(null);
         assertThat(ra.scale, scaleMatcher);
