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);
