Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/PreferencesTestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/PreferencesTestUtils.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/PreferencesTestUtils.java	(revision 17275)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.gui.preferences;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java	(revision 17275)
@@ -12,5 +12,5 @@
 
 import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.actions.ActionParameter;
 import org.openstreetmap.josm.actions.ActionParameter.StringActionParameter;
@@ -22,5 +22,5 @@
  * Unit tests of {@link ToolbarPreferences} class.
  */
-public class ToolbarPreferencesTest {
+class ToolbarPreferencesTest {
 
     private static class TestAction extends AbstractAction implements ParameterizedAction {
@@ -58,5 +58,5 @@
 
     @Test
-    public void testCase1() {
+    void testCase1() {
         Map<String, Action> actions = new HashMap<>();
         actions.put("action", new TestAction());
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.advanced;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link AdvancedPreference} class.
  */
-public class AdvancedPreferenceTest {
+class AdvancedPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testAdvancedPreference() {
+    void testAdvancedPreference() {
         assertNotNull(new AdvancedPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new AdvancedPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileActionTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileActionTest.java	(revision 17275)
@@ -6,6 +6,6 @@
 import javax.swing.JOptionPane;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.Preferences;
@@ -18,9 +18,9 @@
  * Unit tests of {@link ExportProfileAction} class.
  */
-public class ExportProfileActionTest {
+class ExportProfileActionTest {
     /**
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT();
@@ -30,5 +30,5 @@
      */
     @Test
-    public void testAction() {
+    void testAction() {
         TestUtils.assumeWorkingJMockit();
         new JOptionPaneSimpleMocker(Collections.singletonMap(
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ListEditorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ListEditorTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ListEditorTest.java	(revision 17275)
@@ -2,12 +2,12 @@
 package org.openstreetmap.josm.gui.preferences.advanced;
 
-import static org.junit.Assert.assertEquals;
-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.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Arrays;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.advanced.ListEditor.ListSettingTableModel;
@@ -16,10 +16,10 @@
  * Unit tests of {@link ListEditor} class.
  */
-public class ListEditorTest {
+class ListEditorTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -30,5 +30,5 @@
      */
     @Test
-    public void testListSettingTableModel() {
+    void testListSettingTableModel() {
         ListSettingTableModel model = new ListSettingTableModel(null);
         assertNotNull(model.getData());
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java	(revision 17275)
@@ -2,10 +2,10 @@
 package org.openstreetmap.josm.gui.preferences.advanced;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-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.assertTrue;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.TestUtils;
@@ -17,10 +17,10 @@
  * Unit tests of {@link PrefEntry} class.
  */
-public class PrefEntryTest {
+class PrefEntryTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -31,5 +31,5 @@
      */
     @Test
-    public void testPrefEntry() {
+    void testPrefEntry() {
         String key = "key";
         StringSetting val = new StringSetting("value");
@@ -55,5 +55,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(PrefEntry.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTableTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.advanced;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-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.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Arrays;
@@ -11,6 +11,6 @@
 import javax.swing.JOptionPane;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.ExtendedDialog;
@@ -26,9 +26,9 @@
  * Unit tests of {@link PreferencesTable} class.
  */
-public class PreferencesTableTest {
+class PreferencesTableTest {
     /**
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT();
@@ -48,5 +48,5 @@
      */
     @Test
-    public void testPreferencesTable() {
+    void testPreferencesTable() {
         TestUtils.assumeWorkingJMockit();
         final JOptionPaneSimpleMocker mocker = new JOptionPaneSimpleMocker();
@@ -75,5 +75,5 @@
      */
     @Test
-    public void testAllSettingsTableModel() {
+    void testAllSettingsTableModel() {
         AllSettingsTableModel model = (AllSettingsTableModel) newTable().getModel();
         assertEquals(1, model.getRowCount());
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.audio;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -13,10 +13,10 @@
  * Unit tests of {@link AudioPreference} class.
  */
-public class AudioPreferenceTest {
+class AudioPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -27,5 +27,5 @@
      */
     @Test
-    public void testAudioPreference() {
+    void testAudioPreference() {
         assertNotNull(new AudioPreference.Factory().createPreferenceSetting());
     }
@@ -35,5 +35,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         Config.getPref().putBoolean("audio.menuinvisible", true);
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new AudioPreference.Factory(), null);
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.display;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link ColorPreference} class.
  */
-public class ColorPreferenceTest {
+class ColorPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testColorPreference() {
+    void testColorPreference() {
         assertNotNull(new ColorPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new ColorPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.display;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link DisplayPreference} class.
  */
-public class DisplayPreferenceTest {
+class DisplayPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testDisplayPreference() {
+    void testDisplayPreference() {
         assertNotNull(new DisplayPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new DisplayPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.display;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link DrawingPreference} class.
  */
-public class DrawingPreferenceTest {
+class DrawingPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testDrawingPreference() {
+    void testDrawingPreference() {
         assertNotNull(new DrawingPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new DrawingPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/GPXPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/GPXPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/GPXPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.display;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link GPXPreference} class.
  */
-public class GPXPreferenceTest {
+class GPXPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testGPXPreference() {
+    void testGPXPreference() {
         assertNotNull(new GPXPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new GPXPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.display;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link LafPreference} class.
  */
-public class LafPreferenceTest {
+class LafPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testLafPreference() {
+    void testLafPreference() {
         assertNotNull(new LafPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new LafPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.display;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link LanguagePreference} class.
  */
-public class LanguagePreferenceTest {
+class LanguagePreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testLanguagePreference() {
+    void testLanguagePreference() {
         assertNotNull(new LanguagePreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new LanguagePreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanelTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanelTest.java	(revision 17275)
@@ -2,9 +2,9 @@
 package org.openstreetmap.josm.gui.preferences.imagery;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -14,10 +14,10 @@
  * Unit tests of {@link AddTMSLayerPanel} class.
  */
-public class AddTMSLayerPanelTest {
+class AddTMSLayerPanelTest {
 
     /**
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -27,5 +27,5 @@
      */
     @Test
-    public void testAddTMSLayerPanel() {
+    void testAddTMSLayerPanel() {
         AddTMSLayerPanel panel = new AddTMSLayerPanel();
         assertEquals("", panel.getImageryInfo().getUrl());
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.imagery;
 
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -13,10 +13,10 @@
  * Unit tests of {@link AddWMSLayerPanel} class.
  */
-public class AddWMSLayerPanelTest {
+class AddWMSLayerPanelTest {
 
     /**
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testAddWMSLayerPanel() {
+    void testAddWMSLayerPanel() {
         AddWMSLayerPanel panel = new AddWMSLayerPanel();
         assertFalse(panel.isImageryValid());
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanelTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanelTest.java	(revision 17275)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.gui.preferences.imagery;
 
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
-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 +14,10 @@
  * Unit tests of {@link AddWMTSLayerPanel} class.
  */
-public class AddWMTSLayerPanelTest {
+class AddWMTSLayerPanelTest {
 
     /**
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -26,5 +27,5 @@
      */
     @Test
-    public void testAddWMTSLayerPanel() {
+    void testAddWMTSLayerPanel() {
         AddWMTSLayerPanel panel = new AddWMTSLayerPanel();
         assertFalse(panel.isImageryValid());
@@ -34,7 +35,7 @@
      * Unit test of {@link AddWMTSLayerPanel#getImageryInfo}.
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testGetImageryInfo() {
-        new AddWMTSLayerPanel().getImageryInfo();
+    @Test
+    void testGetImageryInfo() {
+        assertThrows(IllegalArgumentException.class, () -> new AddWMTSLayerPanel().getImageryInfo());
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java	(revision 17275)
@@ -2,11 +2,11 @@
 package org.openstreetmap.josm.gui.preferences.imagery;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.io.File;
 import java.util.Arrays;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -19,10 +19,10 @@
  * Unit tests of {@link ImageryPreference} class.
  */
-public class ImageryPreferenceTest {
+class ImageryPreferenceTest {
 
     /**
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().main();
@@ -32,5 +32,5 @@
      */
     @Test
-    public void testImageryPreference() {
+    void testImageryPreference() {
         assertNotNull(new ImageryPreference.Factory().createPreferenceSetting());
     }
@@ -40,5 +40,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         String fileUrl = new File(TestUtils.getTestDataRoot()+"__files/imagery/maps.xml").toURI().toString();
         Config.getPref().putList("imagery.layers.sites", Arrays.asList(fileUrl));
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 17275)
@@ -396,5 +396,5 @@
     @ParameterizedTest(name = "{0}")
     @MethodSource("data")
-    public void testImageryEntryValidity(String id, ImageryInfo info) {
+    void testImageryEntryValidity(String id, ImageryInfo info) {
         checkEntry(info);
         assertTrue(errors.isEmpty(), format(errors));
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.map;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link BackupPreference} class.
  */
-public class BackupPreferenceTest {
+class BackupPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testBackupPreference() {
+    void testBackupPreference() {
         assertNotNull(new BackupPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new BackupPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.map;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link MapPaintPreference} class.
  */
-public class MapPaintPreferenceTest {
+class MapPaintPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testMapPaintPreference() {
+    void testMapPaintPreference() {
         assertNotNull(new MapPaintPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new MapPaintPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java	(revision 17275)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.gui.preferences.map;
 
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
@@ -10,7 +10,7 @@
 import java.util.List;
 
-import org.junit.BeforeClass;
 import org.junit.ClassRule;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized.Parameters;
@@ -35,5 +35,5 @@
  */
 @RunWith(ParallelParameterized.class)
-public class MapPaintPreferenceTestIT extends AbstractExtendedSourceEntryTestCase {
+class MapPaintPreferenceTestIT extends AbstractExtendedSourceEntryTestCase {
 
     /**
@@ -48,5 +48,5 @@
      * @throws IOException in case of I/O error
      */
-    @BeforeClass
+    @BeforeAll
     public static void beforeClass() throws IOException {
         errorsToIgnore.addAll(TestUtils.getIgnoredErrorMessages(MapPaintPreferenceTestIT.class));
@@ -70,5 +70,5 @@
      * @param source source entry to test
      */
-    public MapPaintPreferenceTestIT(String displayName, String url, ExtendedSourceEntry source) {
+    MapPaintPreferenceTestIT(String displayName, String url, ExtendedSourceEntry source) {
         super(source);
     }
@@ -79,5 +79,5 @@
      */
     @Test
-    public void testStyleValidity() throws Exception {
+    void testStyleValidity() throws Exception {
         assumeFalse(isIgnoredSubstring(source.url));
         StyleSource style = MapPaintStyles.addStyle(source);
@@ -108,5 +108,5 @@
         warnings.removeAll(ignoredErrors);
 
-        assertTrue(errors.toString() + '\n' + warnings.toString(), errors.isEmpty() && warnings.isEmpty());
+        assertTrue(errors.isEmpty() && warnings.isEmpty(), errors.toString() + '\n' + warnings.toString());
         assumeTrue(ignoredErrors.toString(), ignoredErrors.isEmpty());
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.map;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link MapPreference} class.
  */
-public class MapPreferenceTest {
+class MapPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testMapPreference() {
+    void testMapPreference() {
         assertNotNull(new MapPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new MapPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.map;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link TaggingPresetPreference} class.
  */
-public class TaggingPresetPreferenceTest {
+class TaggingPresetPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testTaggingPresetPreference() {
+    void testTaggingPresetPreference() {
         assertNotNull(new TaggingPresetPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new TaggingPresetPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.map;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
@@ -15,7 +15,7 @@
 import java.util.Set;
 
-import org.junit.BeforeClass;
 import org.junit.ClassRule;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -41,5 +41,5 @@
  */
 @RunWith(Parameterized.class)
-public class TaggingPresetPreferenceTestIT extends AbstractExtendedSourceEntryTestCase {
+class TaggingPresetPreferenceTestIT extends AbstractExtendedSourceEntryTestCase {
 
     /**
@@ -54,5 +54,5 @@
      * @throws IOException in case of I/O error
      */
-    @BeforeClass
+    @BeforeAll
     public static void beforeClass() throws IOException {
         errorsToIgnore.addAll(TestUtils.getIgnoredErrorMessages(TaggingPresetPreferenceTestIT.class));
@@ -81,5 +81,5 @@
      * @param source source entry to test
      */
-    public TaggingPresetPreferenceTestIT(String displayName, String url, ExtendedSourceEntry source) {
+    TaggingPresetPreferenceTestIT(String displayName, String url, ExtendedSourceEntry source) {
         super(source);
     }
@@ -90,5 +90,5 @@
      */
     @Test
-    public void testPresetsValidity() throws Exception {
+    void testPresetsValidity() throws Exception {
         assumeFalse(isIgnoredSubstring(source.url));
         Set<String> errors = new HashSet<>();
@@ -106,5 +106,5 @@
             handleException(e, errors);
         }
-        assertTrue(errors.toString(), errors.isEmpty());
+        assertTrue(errors.isEmpty(), errors::toString);
         assumeTrue(ignoredErrors.toString(), ignoredErrors.isEmpty());
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.gui.preferences.plugin;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.io.File;
@@ -10,6 +10,6 @@
 import java.util.Collections;
 
-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;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -18,6 +18,6 @@
 import org.openstreetmap.josm.plugins.PluginException;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -30,5 +30,5 @@
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT();
@@ -38,5 +38,5 @@
      */
     @Test
-    public void testPluginPreference() {
+    void testPluginPreference() {
         assertNotNull(new PluginPreference.Factory().createPreferenceSetting());
     }
@@ -57,5 +57,5 @@
      */
     @Test
-    public void testBuildDownloadSummary() throws Exception {
+    void testBuildDownloadSummary() throws Exception {
         final PluginInformation dummy = getDummyPluginInformation();
         assertEquals("", PluginPreference.buildDownloadSummary(
@@ -89,5 +89,5 @@
      */
     @Test
-    public void testNotifyDownloadResults() {
+    void testNotifyDownloadResults() {
         final HelpAwareOptionPaneMocker mocker = new HelpAwareOptionPaneMocker();
         mocker.getMockResultMap().put("<html></html>", "OK");  // (buildDownloadSummary() output was empty)
@@ -103,5 +103,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new PluginPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.projection;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link ProjectionPreference} class.
  */
-public class ProjectionPreferenceTest {
+class ProjectionPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testProjectionPreference() {
+    void testProjectionPreference() {
         assertNotNull(new ProjectionPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new ProjectionPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.remotecontrol;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link RemoteControlPreference} class.
  */
-public class RemoteControlPreferenceTest {
+class RemoteControlPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testRemoteControlPreference() {
+    void testRemoteControlPreference() {
         assertNotNull(new RemoteControlPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new RemoteControlPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.server;
 
-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.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
@@ -14,10 +14,10 @@
  * Unit tests of {@link ProxyPreference} class.
  */
-public class ProxyPreferenceTest {
+class ProxyPreferenceTest {
 
     /**
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -27,5 +27,5 @@
      */
     @Test
-    public void testProxyPreference() {
+    void testProxyPreference() {
         assertNotNull(new ProxyPreference.Factory().createPreferenceSetting());
     }
@@ -35,5 +35,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new ProxyPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.server;
 
-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.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
@@ -14,10 +14,10 @@
  * Unit tests of {@link ServerAccessPreference} class.
  */
-public class ServerAccessPreferenceTest {
+class ServerAccessPreferenceTest {
 
     /**
      * Setup tests
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -27,5 +27,5 @@
      */
     @Test
-    public void testServerAccessPreference() {
+    void testServerAccessPreference() {
         assertNotNull(new ServerAccessPreference.Factory().createPreferenceSetting());
     }
@@ -35,5 +35,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new ServerAccessPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.shortcut;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link ShortcutPreference} class.
  */
-public class ShortcutPreferenceTest {
+class ShortcutPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testShortcutPreference() {
+    void testShortcutPreference() {
         assertNotNull(new ShortcutPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new ShortcutPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.validator;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link ValidatorPreference} class.
  */
-public class ValidatorPreferenceTest {
+class ValidatorPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testValidatorPreference() {
+    void testValidatorPreference() {
         assertNotNull(new ValidatorPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new ValidatorPreference.Factory(), null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.gui.preferences.validator;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
@@ -9,6 +9,6 @@
 import java.util.Collection;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry;
 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker;
@@ -21,10 +21,10 @@
  * Integration tests of {@link ValidatorTagCheckerRulesPreference} class.
  */
-public class ValidatorTagCheckerRulesPreferenceTestIT {
+class ValidatorTagCheckerRulesPreferenceTestIT {
 
     /**
      * Setup rule
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().https().timeout(20_000);
@@ -35,5 +35,5 @@
      */
     @Test
-    public void testValidityOfAvailableRules() throws Exception {
+    void testValidityOfAvailableRules() throws Exception {
         Collection<ExtendedSourceEntry> sources = new ValidatorTagCheckerRulesPreference.TagCheckerRulesSourceEditor()
                 .loadAndGetAvailableSources();
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java	(revision 17195)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.preferences.validator;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
@@ -12,10 +12,10 @@
  * Unit tests of {@link ValidatorTestsPreference} class.
  */
-public class ValidatorTestsPreferenceTest {
+class ValidatorTestsPreferenceTest {
 
     /**
      * Setup test.
      */
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testValidatorTestsPreference() {
+    void testValidatorTestsPreference() {
         assertNotNull(new ValidatorTestsPreference.Factory().createPreferenceSetting());
     }
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testAddGui() {
+    void testAddGui() {
         PreferencesTestUtils.doTestPreferenceSettingAddGui(new ValidatorTestsPreference.Factory(), ValidatorPreference.class);
     }
