Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java	(revision 17278)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java	(revision 17279)
@@ -3,9 +3,9 @@
 
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assertions.assertArrayEquals;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -28,6 +28,6 @@
 
 import org.awaitility.Awaitility;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.Rule;
+import org.junit.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.Bounds;
@@ -55,10 +55,10 @@
  * Unit tests of {@link MinimapDialog} class.
  */
-class MinimapDialogTest {
+public class MinimapDialogTest {
 
     /**
      * Setup tests
      */
-    @RegisterExtension
+    @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules josmTestRules = new JOSMTestRules().main().projection().fakeImagery();
@@ -68,5 +68,5 @@
      */
     @Test
-    void testMinimapDialog() {
+    public void testMinimapDialog() {
         MinimapDialog dlg = new MinimapDialog();
         dlg.showDialog();
@@ -102,10 +102,10 @@
                 assertEquals(equalText, isSelected);
                 if (equalText) {
-                    assertFalse(found, "Second selected source found");
+                    assertFalse("Second selected source found", found);
                     found = true;
                 }
             }
         }
-        assertTrue(found, "Selected source not found in menu");
+        assertTrue("Selected source not found in menu", found);
     }
 
@@ -199,5 +199,5 @@
      */
     @Test
-    void testSourceSwitching() throws Exception {
+    public void testSourceSwitching() throws Exception {
         // relevant prefs starting out empty, should choose the first source and have shown download area enabled
         // (not that there's a data layer for it to use)
@@ -246,5 +246,5 @@
      */
     @Test
-    void testRefreshSourcesRetainsSelection() throws Exception {
+    public void testRefreshSourcesRetainsSelection() throws Exception {
         // relevant prefs starting out empty, should choose the first source and have shown download area enabled
         // (not that there's a data layer for it to use)
@@ -284,5 +284,5 @@
      */
     @Test
-    void testRemovedSourceStillSelected() throws Exception {
+    public void testRemovedSourceStillSelected() throws Exception {
         // relevant prefs starting out empty, should choose the first source and have shown download area enabled
         // (not that there's a data layer for it to use)
@@ -317,5 +317,5 @@
      */
     @Test
-    void testTileSourcesFromCurrentLayers() throws Exception {
+    public void testTileSourcesFromCurrentLayers() throws Exception {
         // relevant prefs starting out empty, should choose the first (ImageryLayerInfo) source and have shown download area enabled
         // (not that there's a data layer for it to use)
@@ -451,5 +451,5 @@
      */
     @Test
-    void testSourcePrefObeyed() throws Exception {
+    public void testSourcePrefObeyed() throws Exception {
         Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
 
@@ -478,5 +478,5 @@
      */
     @Test
-    void testSourcePrefInvalid() throws Exception {
+    public void testSourcePrefInvalid() throws Exception {
         Config.getPref().put("slippy_map_chooser.mapstyle", "Hooloovoo Tiles");
 
@@ -500,5 +500,5 @@
      */
     @Test
-    void testViewportAspectRatio() throws Exception {
+    public void testViewportAspectRatio() throws Exception {
         // Add a test layer to the layer manager to get the MapFrame & MapView
         MainApplication.getLayerManager().addLayer(new TestLayer());
@@ -546,6 +546,6 @@
         // should equal the number on the right
         assertTrue(
-            Math.abs(rowMatcher.group(1).length() - rowMatcher.group(3).length()) < 4,
-            "Viewport marker not horizontally centered"
+            "Viewport marker not horizontally centered",
+            Math.abs(rowMatcher.group(1).length() - rowMatcher.group(3).length()) < 4
         );
 
@@ -561,12 +561,12 @@
         // should equal the number on the bottom
         assertTrue(
-            Math.abs(colMatcher.group(1).length() - colMatcher.group(3).length()) < 4,
-            "Viewport marker not vertically centered"
+            "Viewport marker not vertically centered",
+            Math.abs(colMatcher.group(1).length() - colMatcher.group(3).length()) < 4
         );
 
         // (within a tolerance for numerical error) the viewport marker should be square
         assertTrue(
-            Math.abs(colMatcher.group(2).length() - rowMatcher.group(2).length()) < 4,
-            "Viewport marker not square"
+            "Viewport marker not square",
+            Math.abs(colMatcher.group(2).length() - rowMatcher.group(2).length()) < 4
         );
 
@@ -591,6 +591,6 @@
         );
         assertTrue(
-            Math.abs(rowMatcher.group(1).length() - rowMatcher.group(3).length()) < 4,
-            "Viewport marker not horizontally centered"
+            "Viewport marker not horizontally centered",
+            Math.abs(rowMatcher.group(1).length() - rowMatcher.group(3).length()) < 4
         );
 
@@ -603,6 +603,6 @@
         );
         assertTrue(
-            Math.abs(colMatcher.group(1).length() - colMatcher.group(3).length()) < 4,
-            "Viewport marker not vertically centered"
+            "Viewport marker not vertically centered",
+            Math.abs(colMatcher.group(1).length() - colMatcher.group(3).length()) < 4
         );
 
@@ -614,6 +614,6 @@
 
         assertTrue(
-            Math.abs(colMatcher.group(2).length() - (rowMatcher.group(2).length()*2.0)) < 5,
-            "Viewport marker not 2:1 aspect ratio"
+            "Viewport marker not 2:1 aspect ratio",
+            Math.abs(colMatcher.group(2).length() - (rowMatcher.group(2).length()*2.0)) < 5
         );
     }
@@ -624,9 +624,9 @@
         for (Component c: menu.getComponents()) {
             if (JPopupMenu.Separator.class.isInstance(c)) {
-                assertFalse(afterSeparator, "More than one separator before target item");
+                assertFalse("More than one separator before target item", afterSeparator);
                 afterSeparator = true;
             } else if (((JMenuItem) c).getText().equals(tr("Show downloaded area"))) {
-                assertTrue(afterSeparator, "Separator not found before target item");
-                assertTrue(JCheckBoxMenuItem.class.isInstance(c), "Target item doesn't appear to be a JCheckBoxMenuItem");
+                assertTrue("Separator not found before target item", afterSeparator);
+                assertTrue("Target item doesn't appear to be a JCheckBoxMenuItem", JCheckBoxMenuItem.class.isInstance(c));
                 return (JCheckBoxMenuItem) c;
             }
@@ -641,5 +641,5 @@
      */
     @Test
-    void testShowDownloadedArea() throws Exception {
+    public void testShowDownloadedArea() throws Exception {
         Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
         Config.getPref().putBoolean("slippy_map_chooser.show_downloaded_area", false);
@@ -800,5 +800,5 @@
      */
     @Test
-    void testShowDownloadedAreaLayerSwitching() throws Exception {
+    public void testShowDownloadedAreaLayerSwitching() throws Exception {
         Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
         Config.getPref().putBoolean("slippy_map_chooser.show_downloaded_area", true);
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/CycleLayerActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/CycleLayerActionTest.java	(revision 17278)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/CycleLayerActionTest.java	(revision 17279)
@@ -2,10 +2,10 @@
 package org.openstreetmap.josm.gui.dialogs.layer;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.Assert.assertEquals;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
 import org.openstreetmap.josm.data.imagery.ImageryLayerInfo;
@@ -24,7 +24,7 @@
  * @author Taylor Smock
  */
-class CycleLayerActionTest {
+public class CycleLayerActionTest {
     /** Layers need a projection */
-    @RegisterExtension
+    @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().main().preferences().projection().fakeImagery();
@@ -37,5 +37,5 @@
      * Set up common items (make layers, etc.)
      */
-    @BeforeEach
+    @Before
     public void setUp() {
         cycleDown = new CycleLayerDownAction();
@@ -51,5 +51,5 @@
      */
     @Test
-    void testDownBottom() {
+    public void testDownBottom() {
         manager.setActiveLayer(manager.getLayers().get(0));
         cycleDown.actionPerformed(null);
@@ -61,5 +61,5 @@
      */
     @Test
-    void testUpTop() {
+    public void testUpTop() {
         manager.setActiveLayer(manager.getLayers().get(manager.getLayers().size() - 1));
         cycleUp.actionPerformed(null);
@@ -71,5 +71,5 @@
      */
     @Test
-    void testDown() {
+    public void testDown() {
         manager.setActiveLayer(manager.getLayers().get(3));
         cycleDown.actionPerformed(null);
@@ -81,5 +81,5 @@
      */
     @Test
-    void testUp() {
+    public void testUp() {
         manager.setActiveLayer(manager.getLayers().get(3));
         cycleUp.actionPerformed(null);
@@ -91,5 +91,5 @@
      */
     @Test
-    void testNoLayers() {
+    public void testNoLayers() {
         manager.getLayers().forEach(manager::removeLayer);
         cycleUp.actionPerformed(null);
@@ -102,5 +102,5 @@
      */
     @Test
-    void testWithAerialImagery() {
+    public void testWithAerialImagery() {
         final ImageryInfo magentaTilesInfo = ImageryLayerInfo.instance.getLayers().stream()
                 .filter(i -> i.getName().equals("Magenta Tiles")).findAny().get();
