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