Index: trunk/test/functional/org/openstreetmap/josm/data/BoundariesTestIT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/data/BoundariesTestIT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/data/BoundariesTestIT.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.data;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.InputStream;
@@ -11,6 +11,6 @@
 import java.util.stream.Collectors;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -24,5 +24,5 @@
  * Test of boundaries OSM file.
  */
-public class BoundariesTestIT {
+class BoundariesTestIT {
 
     private static final List<String> RETIRED_ISO3166_1_CODES = Arrays.asList(
@@ -50,5 +50,5 @@
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -59,5 +59,5 @@
      */
     @Test
-    public void testBoundariesFile() throws Exception {
+    void testBoundariesFile() throws Exception {
         try (InputStream is = getClass().getResourceAsStream("/data/boundaries.osm")) {
             DataSet ds = OsmReader.parseDataSet(is, null);
@@ -67,5 +67,5 @@
             for (String code : iso31661a2) {
                 if (!RETIRED_ISO3166_1_CODES.contains(code)) {
-                    assertEquals(code, 1, tagged.stream().filter(SearchCompiler.compile("ISO3166-1\\:alpha2="+code)).count());
+                    assertEquals(1, tagged.stream().filter(SearchCompiler.compile("ISO3166-1\\:alpha2="+code)).count(), code);
                 }
             }
@@ -73,9 +73,9 @@
             for (OsmPrimitive p : tagged.stream().filter(SearchCompiler.compile("ISO3166-1\\:alpha2")).collect(Collectors.toList())) {
                 String code = p.get("ISO3166-1:alpha2");
-                assertTrue(code, iso31661a2.contains(code) || EXCEPTIONNALY_RESERVED_ISO3166_1_CODES.contains(code));
+                assertTrue(iso31661a2.contains(code) || EXCEPTIONNALY_RESERVED_ISO3166_1_CODES.contains(code), code);
             }
             // Check presence of all ISO-3166-2 codes for USA, Canada, Australia (for speed limits)
             for (String code : ISO3166_2_CODES) {
-                assertEquals(code, 1, tagged.stream().filter(SearchCompiler.compile("ISO3166-2="+code)).count());
+                assertEquals(1, tagged.stream().filter(SearchCompiler.compile("ISO3166-2="+code)).count(), code);
             }
         }
Index: trunk/test/functional/org/openstreetmap/josm/data/imagery/ImageryCompareTestIT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/data/imagery/ImageryCompareTestIT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/data/imagery/ImageryCompareTestIT.java	(revision 17275)
@@ -2,10 +2,10 @@
 package org.openstreetmap.josm.data.imagery;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.net.URL;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
@@ -18,5 +18,5 @@
  * See <a href="https://josm.openstreetmap.de/wiki/ImageryCompare">JOSM wiki</a>
  */
-public class ImageryCompareTestIT {
+class ImageryCompareTestIT {
 
     private static final String BLACK_PREFIX = "<pre style=\"margin:3px;color:black\">";
@@ -26,5 +26,5 @@
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().timeout(60000);
@@ -35,5 +35,5 @@
      */
     @Test
-    public void testImageryEntries() throws Exception {
+    void testImageryEntries() throws Exception {
         // Increase traditional timeouts to avoid random problems
         Config.getPref().putInt("socket.timeout.connect", 60);
Index: trunk/test/functional/org/openstreetmap/josm/data/osm/TaginfoTestIT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/data/osm/TaginfoTestIT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/data/osm/TaginfoTestIT.java	(revision 17275)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.data.osm;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
@@ -15,6 +15,6 @@
 import javax.json.JsonValue;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker;
@@ -31,10 +31,10 @@
  * Various integration tests with Taginfo.
  */
-public class TaginfoTestIT {
+class TaginfoTestIT {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().timeout(20000);
@@ -47,5 +47,5 @@
      */
     @Test
-    public void testCheckPopularTags() throws SAXException, IOException, ParseException {
+    void testCheckPopularTags() throws SAXException, IOException, ParseException {
         TaggingPresets.readFromPreferences();
         new TagChecker().initialize();
@@ -90,5 +90,5 @@
             System.err.println(error);
         }
-        assertTrue(errors.toString(), errors.isEmpty());
+        assertTrue(errors.isEmpty(), errors::toString);
     }
 }
Index: trunk/test/functional/org/openstreetmap/josm/gui/GettingStartedTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/GettingStartedTest.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/GettingStartedTest.java	(revision 17275)
@@ -2,11 +2,11 @@
 package org.openstreetmap.josm.gui;
 
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
 import java.io.IOException;
 
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.JOSMFixture;
 
@@ -14,10 +14,10 @@
  * Tests the {@link GettingStarted} class.
  */
-public class GettingStartedTest {
+class GettingStartedTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void init() {
         JOSMFixture.createFunctionalTestFixture().init();
@@ -30,6 +30,6 @@
      */
     @Test
-    @Ignore("see #15240, inactive for /browser/trunk/nodist/images/download.png")
-    public void testImageReplacement() throws IOException {
+    @Disabled("see #15240, inactive for /browser/trunk/nodist/images/download.png")
+    void testImageReplacement() throws IOException {
         final String motd = new GettingStarted.MotdContent().updateIfRequiredString();
         // assuming that the MOTD contains one image included, fixImageLinks changes the HTML string
@@ -41,5 +41,5 @@
      */
     @Test
-    public void testImageReplacementStatic() {
+    void testImageReplacementStatic() {
         final String html = "the download button <img src=\"/browser/trunk/resources/images/download.svg?format=raw\" " +
                 "alt=\"source:trunk/resources/images/download.svg\" title=\"source:trunk/resources/images/download.svg\" />.";
Index: trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTestFT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTestFT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTestFT.java	(revision 17275)
@@ -13,5 +13,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 
-public class NodeListMergerTestFT extends JFrame {
+class NodeListMergerTestFT extends JFrame {
 
     private NodeListMerger nodeListMerger;
@@ -62,5 +62,5 @@
      * Constructs a new {@code NodeListMergerTest}.
      */
-    public NodeListMergerTestFT() {
+    NodeListMergerTestFT() {
         build();
         populate();
Index: trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTestFT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTestFT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTestFT.java	(revision 17275)
@@ -13,5 +13,5 @@
 import org.openstreetmap.josm.data.projection.Projections;
 
-public class PropertiesMergerTestFT extends JFrame {
+class PropertiesMergerTestFT extends JFrame {
 
     private PropertiesMerger merger;
@@ -38,5 +38,5 @@
      * Constructs a new {@code PropertiesMergerTest}.
      */
-    public PropertiesMergerTestFT() {
+    PropertiesMergerTestFT() {
         build();
         populate();
Index: trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTestFT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTestFT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTestFT.java	(revision 17275)
@@ -13,5 +13,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 
-public class RelationMemberMergerTestFT extends JFrame {
+class RelationMemberMergerTestFT extends JFrame {
 
     private RelationMemberMerger merger;
@@ -42,5 +42,5 @@
      * Constructs a new {@code RelationMemberMergerTest}.
      */
-    public RelationMemberMergerTestFT() {
+    RelationMemberMergerTestFT() {
         build();
         populate();
Index: trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTestFT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTestFT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTestFT.java	(revision 17275)
@@ -6,5 +6,5 @@
 import javax.swing.JFrame;
 
-public class TagMergerTestFT extends JFrame {
+class TagMergerTestFT extends JFrame {
 
     private TagMerger tagMerger;
@@ -19,5 +19,5 @@
      * Constructs a new {@code TagMergerTest}.
      */
-    public TagMergerTestFT() {
+    TagMergerTestFT() {
         build();
         tagMerger.getModel().addItem(new TagMergeItem("key", "myvalue", "theirvalue"));
Index: trunk/test/functional/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialogTestFT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialogTestFT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialogTestFT.java	(revision 17275)
@@ -9,5 +9,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 
-public class ConflictResolutionDialogTestFT extends JFrame {
+class ConflictResolutionDialogTestFT extends JFrame {
 
     private ConflictResolutionDialog dialog;
@@ -38,5 +38,5 @@
      * Constructs a new {@code ConflictResolutionDialogTest}.
      */
-    public ConflictResolutionDialogTestFT() {
+    ConflictResolutionDialogTestFT() {
         build();
     }
Index: trunk/test/functional/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTestFT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTestFT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTestFT.java	(revision 17275)
@@ -4,5 +4,5 @@
 import javax.swing.JFrame;
 
-public class ChangesetCacheManagerTestFT extends JFrame {
+class ChangesetCacheManagerTestFT extends JFrame {
 
     private ChangesetCacheManager manager;
Index: trunk/test/functional/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialogTestFT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialogTestFT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialogTestFT.java	(revision 17275)
@@ -4,5 +4,5 @@
 import javax.swing.JFrame;
 
-public class ChangesetQueryDialogTestFT extends JFrame {
+class ChangesetQueryDialogTestFT extends JFrame {
 
     private ChangesetQueryDialog dialog;
Index: trunk/test/functional/org/openstreetmap/josm/gui/history/HistoryBrowserTestFT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/history/HistoryBrowserTestFT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/history/HistoryBrowserTestFT.java	(revision 17275)
@@ -6,5 +6,5 @@
 import javax.swing.JFrame;
 
-import org.junit.BeforeClass;
+import org.junit.jupiter.api.BeforeAll;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
@@ -17,7 +17,7 @@
 import org.openstreetmap.josm.tools.Logging;
 
-public class HistoryBrowserTestFT extends JFrame {
+class HistoryBrowserTestFT extends JFrame {
 
-    @BeforeClass
+    @BeforeAll
     public static void init() {
         JOSMFixture.createFunctionalTestFixture().init();
@@ -49,10 +49,9 @@
      * Constructs a new {@code HistoryBrowserTest}.
      */
-    public HistoryBrowserTestFT() {
+    HistoryBrowserTestFT() {
         build();
         //populate(OsmPrimitiveType.NODE,354117);
         //populate(OsmPrimitiveType.WAY,37951);
         populate(OsmPrimitiveType.RELATION, 5055);
-
     }
 
Index: trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java	(revision 17275)
@@ -2,6 +2,7 @@
 package org.openstreetmap.josm.gui.mappaint;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
 import java.awt.Color;
@@ -27,8 +28,7 @@
 import javax.imageio.ImageIO;
 
-import org.junit.Assume;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
+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;
@@ -67,5 +67,5 @@
      * Minimal test rules required
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().projection();
@@ -181,12 +181,12 @@
      * @since 11691
      */
-    @Before
+    @BeforeEach
     public void forOpenJDK() {
         String javaHome = System.getProperty("java.home");
-        Assume.assumeTrue("Test requires openJDK", javaHome != null && javaHome.toLowerCase(Locale.ENGLISH).contains("openjdk"));
+        assumeTrue(javaHome != null && javaHome.toLowerCase(Locale.ENGLISH).contains("openjdk"), "Test requires openJDK");
 
         List<String> fonts = Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
         for (String font : testConfig.fonts) {
-            Assume.assumeTrue("Test requires font: " + font, fonts.contains(font));
+            assumeTrue(fonts.contains(font), "Test requires font: " + font);
         }
     }
@@ -197,5 +197,5 @@
      */
     @Test
-    public void testRender() throws Exception {
+    void testRender() throws Exception {
         // Force reset of preferences
         StyledMapRenderer.PREFERENCE_ANTIALIASING_USE.put(true);
Index: trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 17275)
@@ -2,5 +2,7 @@
 package org.openstreetmap.josm.gui.mappaint;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.awt.Color;
@@ -11,10 +13,9 @@
 import java.util.IdentityHashMap;
 
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -36,5 +37,5 @@
  * Test {@link StyleCache}.
  */
-public class StyleCacheTest {
+class StyleCacheTest {
 
     private static final int IMG_WIDTH = 1400;
@@ -50,5 +51,5 @@
      * The test rules used for this test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().projection().mapStyles().timeout(60000);
@@ -58,5 +59,5 @@
      * @throws Exception If an error occurred during load.
      */
-    @BeforeClass
+    @BeforeAll
     public static void load() throws Exception {
         img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_INT_ARGB);
@@ -75,5 +76,5 @@
      * Since we are running junit in non-forked mode, we don't know when this test will not be referenced any more.
      */
-    @AfterClass
+    @AfterAll
     public static void unload() {
         g = null;
@@ -87,5 +88,5 @@
      * Create the temporary graphics
      */
-    @Before
+    @BeforeEach
     public void loadGraphicComponents() {
         g = (Graphics2D) img.getGraphics();
@@ -110,5 +111,5 @@
      */
     @Test
-    public void testStyleCacheInternPool() {
+    void testStyleCacheInternPool() {
         MapPaintStyles.getStyles().clearCached();
         StyleCache.clearStyleCachePool();
@@ -130,5 +131,5 @@
                     }
                 }
-                assertEquals("intern pool size", internPoolSize.intValue(), newInternPoolSize);
+                assertEquals(internPoolSize.intValue(), newInternPoolSize, "intern pool size");
             }
         }
@@ -144,5 +145,5 @@
      */
     @Test
-    public void testStyleCacheInternPool2() {
+    void testStyleCacheInternPool2() {
         StyleCache.clearStyleCachePool();
         Bounds bounds = new Bounds(53.56, 13.25, 53.57, 13.26);
@@ -159,5 +160,5 @@
                 Pair<StyleElementList, Range> p = osm.getCachedStyle().getWithRange(nc.getDist100Pixel(), false);
                 StyleElementList sel = p.a;
-                Assert.assertNotNull(sel);
+                assertNotNull(sel);
                 Integer k = counter.get(sel);
                 if (k == null) {
@@ -168,10 +169,8 @@
         }
         int EXPECTED_NO_PRIMITIVES = 4294; // needs to be updated if data file or bbox changes
-        Assert.assertEquals(
-                "The number of rendered primitives should be " + EXPECTED_NO_PRIMITIVES,
-                EXPECTED_NO_PRIMITIVES, noPrimitives);
-        Assert.assertTrue(
-                "Too many StyleElementList instances, they should be shared using the StyleCache",
-                counter.size() < 100);
+        assertEquals(EXPECTED_NO_PRIMITIVES, noPrimitives,
+                "The number of rendered primitives should be " + EXPECTED_NO_PRIMITIVES);
+        assertTrue(counter.size() < 100,
+                "Too many StyleElementList instances, they should be shared using the StyleCache");
     }
 }
Index: trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 17275)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.io;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
 import java.io.File;
@@ -24,9 +25,8 @@
 import java.util.logging.Logger;
 
-import org.junit.Assume;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.rules.Timeout;
 import org.openstreetmap.josm.JOSMFixture;
@@ -43,7 +43,7 @@
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 
 /**
@@ -51,5 +51,5 @@
  */
 @SuppressFBWarnings(value = "CRLF_INJECTION_LOGS")
-public class MultiFetchServerObjectReaderTest {
+class MultiFetchServerObjectReaderTest {
     private static final Logger logger = Logger.getLogger(MultiFetchServerObjectReader.class.getName());
 
@@ -57,5 +57,5 @@
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -64,5 +64,5 @@
      * Global timeout applied to all test methods.
      */
-    @Rule
+    @RegisterExtension
     public Timeout globalTimeout = Timeout.seconds(60);
 
@@ -161,5 +161,5 @@
      * @throws Exception if an error occurs
      */
-    @BeforeClass
+    @BeforeAll
     public static void init() throws Exception {
         if (!TestUtils.areCredentialsProvided()) {
@@ -215,5 +215,5 @@
      * @throws FileNotFoundException if the dataset file cannot be found
      */
-    @Before
+    @BeforeEach
     public void setUp() throws IOException, IllegalDataException, FileNotFoundException {
         if (!TestUtils.areCredentialsProvided()) {
@@ -233,6 +233,6 @@
      */
     @Test
-    public void testMultiGet10Nodes() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testMultiGet10Nodes() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader();
         ArrayList<Node> nodes = new ArrayList<>(ds.getNodes());
@@ -255,6 +255,6 @@
      */
     @Test
-    public void testMultiGet10Ways() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testMultiGet10Ways() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader();
         ArrayList<Way> ways = new ArrayList<>(ds.getWays());
@@ -278,6 +278,6 @@
      */
     @Test
-    public void testMultiGet10Relations() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testMultiGet10Relations() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader();
         ArrayList<Relation> relations = new ArrayList<>(ds.getRelations());
@@ -301,6 +301,6 @@
      */
     @Test
-    public void testMultiGet800Nodes() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testMultiGet800Nodes() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader();
         ArrayList<Node> nodes = new ArrayList<>(ds.getNodes());
@@ -323,6 +323,6 @@
      */
     @Test
-    public void testMultiGetWithNonExistingNode() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testMultiGetWithNonExistingNode() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader();
         ArrayList<Node> nodes = new ArrayList<>(ds.getNodes());
@@ -348,5 +348,5 @@
      */
     @Test
-    public void testBuildRequestString() {
+    void testBuildRequestString() {
         String requestString = new MultiFetchServerObjectReader()
                 .buildRequestString(OsmPrimitiveType.WAY, new TreeSet<>(Arrays.asList(130L, 123L, 126L)));
Index: trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java	(revision 17275)
@@ -2,9 +2,10 @@
 package org.openstreetmap.josm.io;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
 import java.io.File;
@@ -22,8 +23,7 @@
 import java.util.logging.Logger;
 
-import org.junit.Assume;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.TestUtils;
@@ -52,5 +52,5 @@
  */
 @SuppressFBWarnings(value = "CRLF_INJECTION_LOGS")
-public class OsmServerBackreferenceReaderTest {
+class OsmServerBackreferenceReaderTest {
     private static final Logger logger = Logger.getLogger(OsmServerBackreferenceReader.class.getName());
 
@@ -158,5 +158,5 @@
      * @throws IOException if an I/O error occurs
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() throws OsmTransferException, CyclicUploadDependencyException, IOException {
         if (!TestUtils.areCredentialsProvided()) {
@@ -217,5 +217,5 @@
      * @throws FileNotFoundException if the dataset file cannot be found
      */
-    @Before
+    @BeforeEach
     public void setUp() throws IOException, IllegalDataException, FileNotFoundException {
         if (!TestUtils.areCredentialsProvided()) {
@@ -235,6 +235,6 @@
      */
     @Test
-    public void testBackreferenceForNode() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testBackreferenceForNode() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         Node n = lookupNode(ds, 0);
         assertNotNull(n);
@@ -291,6 +291,6 @@
      */
     @Test
-    public void testBackreferenceForNodeFull() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testBackreferenceForNodeFull() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         Node n = lookupNode(ds, 0);
         assertNotNull(n);
@@ -338,6 +338,6 @@
      */
     @Test
-    public void testBackreferenceForWay() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testBackreferenceForWay() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         Way w = lookupWay(ds, 1);
         assertNotNull(w);
@@ -381,6 +381,6 @@
      */
     @Test
-    public void testBackreferenceForWayFull() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testBackreferenceForWayFull() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         Way w = lookupWay(ds, 1);
         assertNotNull(w);
@@ -418,6 +418,6 @@
      */
     @Test
-    public void testBackreferenceForRelation() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testBackreferenceForRelation() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         Relation r = lookupRelation(ds, 1);
         assertNotNull(r);
@@ -536,6 +536,6 @@
      */
     @Test
-    public void testBackreferenceForRelationFull() throws OsmTransferException {
-        Assume.assumeTrue(TestUtils.areCredentialsProvided());
+    void testBackreferenceForRelationFull() throws OsmTransferException {
+        assumeTrue(TestUtils.areCredentialsProvided());
         Relation r = lookupRelation(ds, 1);
         assertNotNull(r);
Index: trunk/test/functional/org/openstreetmap/josm/io/UploadStrategySelectionPanelTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/io/UploadStrategySelectionPanelTest.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/io/UploadStrategySelectionPanelTest.java	(revision 17275)
@@ -12,11 +12,11 @@
 import javax.swing.JTextField;
 
-import org.junit.Ignore;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.gui.io.UploadStrategySelectionPanel;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.tools.Logging;
 
-@Ignore
-public class UploadStrategySelectionPanelTest extends JFrame {
+@Disabled
+class UploadStrategySelectionPanelTest extends JFrame {
 
     protected UploadStrategySelectionPanel uploadStrategySelectionPanel;
@@ -56,10 +56,10 @@
      * Constructs a new {@code UploadStrategySelectionPanelTest}.
      */
-    public UploadStrategySelectionPanelTest() {
+    UploadStrategySelectionPanelTest() {
         build();
         uploadStrategySelectionPanel.setNumUploadedObjects(51000);
     }
 
-    public static void main(String[] args) throws OsmApiInitializationException, OsmTransferCanceledException {
+    public static void main(String[] args) throws Exception {
         OsmApi.getOsmApi().initialize(NullProgressMonitor.INSTANCE);
         new UploadStrategySelectionPanelTest().setVisible(true);
Index: trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTest.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.tools;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.openstreetmap.josm.gui.mappaint.MapCSSRendererTest.assertImageEquals;
 
@@ -48,5 +48,5 @@
  * Unit tests of {@link ImageProvider} class.
  */
-public class ImageProviderTest {
+class ImageProviderTest {
 
     /**
@@ -94,5 +94,5 @@
      */
     @Test
-    public void testTicket9984() throws IOException {
+    void testTicket9984() throws IOException {
         File file = new File(TestUtils.getRegressionDataFile(9984, "tile.png"));
         assertEquals(Transparency.TRANSLUCENT, ImageProvider.read(file, true, true).getTransparency());
@@ -108,5 +108,5 @@
      */
     @Test
-    public void testTicket10030() throws IOException {
+    void testTicket10030() throws IOException {
         File file = new File(TestUtils.getRegressionDataFile(10030, "tile.jpg"));
         BufferedImage img = ImageProvider.read(file, true, true);
@@ -120,5 +120,5 @@
     @Test
     @SuppressFBWarnings(value = "LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE")
-    public void testTicket14319() throws IOException {
+    void testTicket14319() throws IOException {
         LogHandler14319 handler = new LogHandler14319();
         Logger.getLogger(SVGConst.SVG_LOGGER).addHandler(handler);
@@ -134,5 +134,5 @@
      */
     @Test
-    public void testTicket19551() throws SAXException {
+    void testTicket19551() throws SAXException {
         TaggingPreset badPreset = new TaggingPreset();
         badPreset.setType("node,way,relation,closedway");
@@ -155,5 +155,5 @@
      */
     @Test
-    public void testDataUrl() {
+    void testDataUrl() {
         // Red dot image, taken from https://en.wikipedia.org/wiki/Data_URI_scheme#HTML
         assertNotNull(ImageProvider.get("data:image/png;base64," +
@@ -167,5 +167,5 @@
      */
     @Test
-    public void testImageIcon() throws IOException {
+    void testImageIcon() throws IOException {
         ImageResource resource = new ImageProvider("presets/misc/housenumber_small").getResource();
         testImage(12, 9, "housenumber_small-AUTO-null", resource.getImageIcon());
@@ -182,5 +182,5 @@
      */
     @Test
-    public void testImageIconBounded() throws IOException {
+    void testImageIconBounded() throws IOException {
         ImageResource resource = new ImageProvider("presets/misc/housenumber_small").getResource();
         testImage(8, 6, "housenumber_small-BOUNDED-08x08", resource.getImageIconBounded(new Dimension(8, 8)));
@@ -194,5 +194,5 @@
      */
     @Test
-    public void testImageIconPadded() throws IOException {
+    void testImageIconPadded() throws IOException {
         ImageResource resource = new ImageProvider("presets/misc/housenumber_small").getResource();
         testImage(8, 8, "housenumber_small-PADDED-08x08", resource.getPaddedIcon(new Dimension(8, 8)));
@@ -204,6 +204,6 @@
         final BufferedImage image = (BufferedImage) icon.getImage();
         final File referenceFile = getReferenceFile(reference);
-        assertEquals("width", width, image.getWidth(null));
-        assertEquals("height", height, image.getHeight(null));
+        assertEquals(width, image.getWidth(null), "width");
+        assertEquals(height, image.getHeight(null), "height");
         assertImageEquals(reference, referenceFile, image, 0, 0, null);
     }
@@ -219,5 +219,5 @@
      */
     @Test
-    public void testGetImageIconBounded() {
+    void testGetImageIconBounded() {
         int scale = 2;
         GuiSizesHelper.setPixelDensity(scale);
@@ -240,8 +240,10 @@
     /**
      * Test getting an image for a crosshair cursor.
+     * @param guiScale coefficient of monitor pixel density to be set
+     * @throws IOException in case of I/O error
      */
     @ParameterizedTest
     @ValueSource(floats = {1.0f, 1.5f, 3.0f})
-    public void testGetCursorImageForCrosshair(float guiScale) throws IOException {
+    void testGetCursorImageForCrosshair(float guiScale) throws IOException {
         GuiSizesHelper.setPixelDensity(guiScale);
         Point hotSpot = new Point();
@@ -255,8 +257,10 @@
     /**
      * Test getting an image for a custom cursor with overlay.
+     * @param guiScale coefficient of monitor pixel density to be set
+     * @throws IOException in case of I/O error
      */
     @ParameterizedTest
     @ValueSource(floats = {1.0f, 1.5f, 3.0f})
-    public void testGetCursorImageWithOverlay(float guiScale) throws IOException {
+    void testGetCursorImageWithOverlay(float guiScale) throws IOException {
         GuiSizesHelper.setPixelDensity(guiScale);
         Point hotSpot = new Point();
Index: trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTestIT.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTestIT.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTestIT.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.tools;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -13,10 +13,10 @@
  * Integration tests of {@link ImageProvider} class.
  */
-public class ImageProviderTestIT {
+class ImageProviderTestIT {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testWikiProtocol() {
+    void testWikiProtocol() {
         // https://commons.wikimedia.org/wiki/File:OpenJDK_logo.svg
         assertNotNull(ImageProvider.get("wiki://OpenJDK_logo.svg"));
Index: trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTestManual.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTestManual.java	(revision 17211)
+++ trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTestManual.java	(revision 17275)
@@ -11,7 +11,7 @@
 import javax.swing.JPanel;
 
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -21,10 +21,10 @@
  * Unit tests of {@link ImageProvider} class for manual execution.
  */
-public class ImageProviderTestManual {
+class ImageProviderTestManual {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -32,8 +32,9 @@
     /**
      * Test getting a cursor
+     * @throws InterruptedException in case of thread interruption
      */
-    @Ignore("manual execution only, as the look of the cursor cannot be checked automatedly")
+    @Disabled("manual execution only, as the look of the cursor cannot be checked automatedly")
     @Test
-    public void testGetCursor() throws InterruptedException {
+    void testGetCursor() throws InterruptedException {
         JFrame frame = new JFrame();
         frame.setSize(500, 500);
