Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideAbstractImageTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideAbstractImageTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideAbstractImageTest.java	(revision 36064)
@@ -2,17 +2,13 @@
 package org.openstreetmap.josm.plugins.streetside;
 
-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 org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 
-public class StreetsideAbstractImageTest {
-
-  /*@Rule
-  public JOSMTestRules rules = new StreetsideTestRules().platform();*/
-
+class StreetsideAbstractImageTest {
   @Test
-  public void testIsModified() {
+  void testIsModified() {
     StreetsideImage img = new StreetsideImage("key___________________", new LatLon(0, 0), 0);
     assertFalse(img.isModified());
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideDataTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideDataTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideDataTest.java	(revision 36064)
@@ -2,12 +2,15 @@
 package org.openstreetmap.josm.plugins.streetside;
 
-import static org.junit.Assert.assertEquals;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.Arrays;
 import java.util.concurrent.ConcurrentSkipListSet;
 
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIf;
 import org.openstreetmap.josm.data.coor.LatLon;
 
@@ -18,5 +21,6 @@
  * @see StreetsideData
  */
-public class StreetsideDataTest {
+@DisabledIf(value = "org.openstreetmap.josm.plugins.streetside.utils.TestUtil#cannotLoadImages", disabledReason = "At JOSM maintainer request (flaky?)")
+class StreetsideDataTest {
 
   /*@Rule
@@ -33,5 +37,5 @@
    * objects and a {@link StreetsideSequence} object.
    */
-  @Before
+  @BeforeEach
   public void setUp() {
     img1 = new StreetsideImage("id1__________________", new LatLon(0.1, 0.1), 90);
@@ -51,7 +55,6 @@
    * another one in the database, the one that is being added should be ignored.
    */
-  @Ignore
   @Test
-  public void addTest() {
+  void testAdd() {
     data = new StreetsideData();
     assertEquals(0, data.getImages().size());
@@ -69,7 +72,6 @@
    * Test that the size is properly calculated.
    */
-  @Ignore
   @Test
-  public void sizeTest() {
+  void testSize() {
     assertEquals(4, data.getImages().size());
     data.add(new StreetsideImage("id5__________________", new LatLon(0.1, 0.1), 90));
@@ -81,12 +83,11 @@
    * and {@link StreetsideData#getHighlightedImage()} methods.
    */
-  @Ignore
   @Test
-  public void highlighTest() {
+  void testHighlight() {
     data.setHighlightedImage(img1);
     assertEquals(img1, data.getHighlightedImage());
 
     data.setHighlightedImage(null);
-    assertEquals(null, data.getHighlightedImage());
+    assertNull(data.getHighlightedImage());
   }
 
@@ -94,7 +95,6 @@
    * Tests the selection of images.
    */
-  @Ignore
   @Test
-  public void selectTest() {
+  void testSelect() {
     data.setSelectedImage(img1);
     assertEquals(img1, data.getSelectedImage());
@@ -104,5 +104,5 @@
 
     data.setSelectedImage(null);
-    assertEquals(null, data.getSelectedImage());
+    assertNull(data.getSelectedImage());
   }
 
@@ -111,7 +111,6 @@
    * {@link StreetsideData#selectPrevious()} methods.
    */
-  @Ignore
   @Test
-  public void nextAndPreviousTest() {
+  void testNextAndPrevious() {
     data.setSelectedImage(img1);
 
@@ -126,16 +125,14 @@
   }
 
-  @Ignore
-  @Test(expected=IllegalStateException.class)
-  public void nextOfNullImgTest() {
+  @Test
+  void testNextOfNullImg() {
     data.setSelectedImage(null);
-    data.selectNext();
+    assertThrows(IllegalStateException.class, data::selectNext);
   }
 
-  @Ignore
-  @Test(expected=IllegalStateException.class)
-  public void previousOfNullImgTest() {
+  @Test
+  void testPreviousOfNullImg() {
     data.setSelectedImage(null);
-    data.selectPrevious();
+    assertThrows(IllegalStateException.class, data::selectPrevious);
   }
 
@@ -144,7 +141,6 @@
    * multiselected List should reset.
    */
-  @Ignore
   @Test
-  public void multiSelectTest() {
+  void testMultiSelect() {
     assertEquals(0, data.getMultiSelectedImages().size());
     data.setSelectedImage(img1);
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideLayerTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideLayerTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideLayerTest.java	(revision 36064)
@@ -2,12 +2,11 @@
 package org.openstreetmap.josm.plugins.streetside;
 
-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.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIf;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
@@ -15,37 +14,37 @@
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.plugins.streetside.cubemap.CubemapUtils;
-import org.openstreetmap.josm.plugins.streetside.utils.TestUtil.StreetsideTestRules;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Main;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
-public class StreetsideLayerTest {
-
-  @Rule
-  public JOSMTestRules rules = new StreetsideTestRules().main().preferences().projection();
-
+@BasicPreferences
+@Main
+@Projection
+@DisabledIf(value = "org.openstreetmap.josm.plugins.streetside.utils.TestUtil#cannotLoadImages", disabledReason = "At JOSM maintainer request (flaky?)")
+class StreetsideLayerTest {
   private static Layer getDummyLayer() {
     return ImageryLayer.create(new ImageryInfo("dummy", "https://example.org"));
   }
 
-  @Ignore
   @Test
-  public void testGetIcon() {
+  void testGetIcon() {
     assertNotNull(StreetsideLayer.getInstance().getIcon());
   }
 
-  @Ignore
   @Test
-  public void testIsMergable() {
+  void testIsMergable() {
     assertFalse(StreetsideLayer.getInstance().isMergable(getDummyLayer()));
   }
 
-  @Ignore
-  @Test(expected = UnsupportedOperationException.class)
-  public void testMergeFrom() {
-    StreetsideLayer.getInstance().mergeFrom(getDummyLayer());
+  @Test
+  void testMergeFrom() {
+    StreetsideLayer layer = StreetsideLayer.getInstance();
+    Layer dummyLayer = getDummyLayer();
+    assertThrows(UnsupportedOperationException.class, () -> layer.mergeFrom(dummyLayer));
   }
 
-  @Ignore
   @Test
-  public void testSetVisible() {
+  void testSetVisible() {
     StreetsideLayer.getInstance().getData().add(new StreetsideImage(CubemapUtils.TEST_IMAGE_ID, new LatLon(0.0, 0.0), 0.0));
     StreetsideLayer.getInstance().getData().add(new StreetsideImage(CubemapUtils.TEST_IMAGE_ID, new LatLon(0.0, 0.0), 0.0));
@@ -56,5 +55,5 @@
     StreetsideLayer.getInstance().setVisible(false);
     for (StreetsideAbstractImage img : StreetsideLayer.getInstance().getData().getImages()) {
-      assertEquals(false, img.isVisible());
+      assertFalse(img.isVisible());
     }
 
@@ -62,11 +61,10 @@
     StreetsideLayer.getInstance().setVisible(true);
     for (StreetsideAbstractImage img : StreetsideLayer.getInstance().getData().getImages()) {
-      assertEquals(true, img.isVisible());
+      assertTrue(img.isVisible());
     }
   }
 
-  @Ignore
   @Test
-  public void testGetInfoComponent() {
+  void testGetInfoComponent() {
     Object comp = StreetsideLayer.getInstance().getInfoComponent();
     assertTrue(comp instanceof String);
@@ -74,7 +72,6 @@
   }
 
-  @Ignore
   @Test
-  public void testClearInstance() {
+  void testClearInstance() {
     StreetsideLayer.getInstance();
     assertTrue(StreetsideLayer.hasInstance());
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideSequenceTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideSequenceTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/StreetsideSequenceTest.java	(revision 36064)
@@ -2,14 +2,12 @@
 package org.openstreetmap.josm.plugins.streetside;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-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.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.Arrays;
 
-import org.junit.Before;
-import org.junit.Test;
-
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 
@@ -20,5 +18,5 @@
  * @see StreetsideSequence
  */
-public class StreetsideSequenceTest {
+class StreetsideSequenceTest {
 
   private final StreetsideImage img1 = new StreetsideImage("key1", new LatLon(0.1, 0.1), 90);
@@ -33,5 +31,5 @@
    * {@link StreetsideSequence} object.
    */
-  @Before
+  @BeforeEach
   public void setUp() {
     seq.add(Arrays.asList(img1, img2, img3, img4));
@@ -43,5 +41,5 @@
    */
   @Test
-  public void nextAndPreviousTest() {
+  void testNextAndPrevious() {
     assertEquals(img2, img1.next());
     assertEquals(img1, img2.previous());
@@ -60,18 +58,9 @@
     // Test IllegalArgumentException when asking for the next image of an image
     // that is not in the sequence.
-    try {
-      seq.next(imgWithoutSeq);
-      fail();
-    } catch (IllegalArgumentException e) {
-      assertTrue(true);
-    }
+    assertThrows(IllegalArgumentException.class, () -> seq.next(imgWithoutSeq));
+
     // Test IllegalArgumentException when asking for the previous image of an
     // image that is not in the sequence.
-    try {
-      seq.previous(imgWithoutSeq);
-      fail();
-    } catch (IllegalArgumentException e) {
-      assertTrue(true);
-    }
+    assertThrows(IllegalArgumentException.class, () -> seq.previous(imgWithoutSeq));
   }
 }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cache/CachesTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cache/CachesTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cache/CachesTest.java	(revision 36064)
@@ -2,12 +2,12 @@
 package org.openstreetmap.josm.plugins.streetside.cache;
 
-import org.junit.Test;
 
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.plugins.streetside.utils.TestUtil;
 
-public class CachesTest {
+class CachesTest {
 
   @Test
-  public void testUtilityClass() {
+  void testUtilityClass() {
     TestUtil.testUtilityClass(Caches.class);
   }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cache/StreetsideCacheTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cache/StreetsideCacheTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cache/StreetsideCacheTest.java	(revision 36064)
@@ -1,24 +1,18 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.streetside.cache;
-//License: GPL. For details, see LICENSE file.
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.openstreetmap.josm.plugins.streetside.cache.StreetsideCache.Type;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import org.openstreetmap.josm.plugins.streetside.cache.StreetsideCache.Type;
-import org.openstreetmap.josm.plugins.streetside.utils.TestUtil.StreetsideTestRules;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-public class StreetsideCacheTest {
-
-  @Rule
-  public JOSMTestRules rules = new StreetsideTestRules().preferences();
+@BasicPreferences
+class StreetsideCacheTest {
 
   @Test
-  public void test() {
+  void testCache() {
     StreetsideCache cache = new StreetsideCache("00000", Type.FULL_IMAGE);
     assertNotNull(cache.getUrl());
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtilsTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtilsTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtilsTest.java	(revision 36064)
@@ -1,16 +1,16 @@
 package org.openstreetmap.josm.plugins.streetside.cubemap;
 
-import static org.junit.Assert.assertEquals;
 
-import org.junit.Ignore;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-public class CubemapUtilsTest {
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
-  @SuppressWarnings("static-method")
+class CubemapUtilsTest {
+
   @Test
-  public final void testConvertDecimal2Quaternary() {
-   final long decimal0 = 680730040l;
-   final long decimal1 = 680931568l;
+  void testConvertDecimal2Quaternary() {
+   final long decimal0 = 680730040L;
+   final long decimal1 = 680931568L;
    String res = CubemapUtils.convertDecimal2Quaternary(decimal0);
    assertEquals("220210301312320", res);
@@ -19,7 +19,6 @@
   }
 
-  @SuppressWarnings("static-method")
   @Test
-  public final void testConvertQuaternary2Decimal() {
+  void testConvertQuaternary2Decimal() {
     final String quadKey0 = "220210301312320";
     final String quadKey1 = "220211203003300";
@@ -30,8 +29,7 @@
   }
 
-  @SuppressWarnings("static-method")
-  @Ignore
+  @Disabled
   @Test
-  public final void testGetFaceNumberForCount() {
+  void testGetFaceNumberForCount() {
     String faceNrFront = CubemapUtils.getFaceNumberForCount(0);
     String faceNrRight = CubemapUtils.getFaceNumberForCount(1);
@@ -48,8 +46,7 @@
   }
 
-  @SuppressWarnings("static-method")
-  @Ignore
+  @Disabled
   @Test
-  public final void testGetCount4FaceNumber() {
+  void testGetCount4FaceNumber() {
     int count4Front = CubemapUtils.getCount4FaceNumber("01");
     int count4Right = CubemapUtils.getCount4FaceNumber("02");
@@ -66,7 +63,6 @@
   }
 
-  @SuppressWarnings("static-method")
   @Test
-  public final void testConvertDoubleCountNrto16TileNr() {
+  void testConvertDoubleCountNrto16TileNr() {
     String x0y0 = CubemapUtils.convertDoubleCountNrto16TileNr("00");
     String x0y1 = CubemapUtils.convertDoubleCountNrto16TileNr("01");
@@ -92,5 +88,5 @@
     assertEquals(x1y0, "02");
     assertEquals(x1y1, "03");
-    assertEquals(x1y2,"12");
+    assertEquals(x1y2, "12");
     assertEquals(x1y3, "13");
     assertEquals(x2y0, "20");
@@ -99,8 +95,7 @@
     assertEquals(x2y3, "31");
     assertEquals(x3y0, "22");
-    assertEquals(x3y1,"23");
+    assertEquals(x3y1, "23");
     assertEquals(x3y2, "32");
     assertEquals(x3y3, "33");
   }
-
 }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTaskTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTaskTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTaskTest.java	(revision 36064)
@@ -1,6 +1,6 @@
 package org.openstreetmap.josm.plugins.streetside.cubemap;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.ArrayList;
@@ -11,23 +11,17 @@
 import java.util.concurrent.Future;
 
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
-public class TileDownloadingTaskTest {
+@Disabled
+class TileDownloadingTaskTest {
 
-  @SuppressWarnings("static-method")
-  @Ignore
   @Test
-  public final void testCall() {
+  final void testCall() throws InterruptedException {
     ExecutorService pool = Executors.newFixedThreadPool(1);
     List<Callable<List<String>>> tasks = new ArrayList<>(1);
       tasks.add(new TileDownloadingTask("2202112030033001233"));
-      try {
-        List<Future<List<String>>> results = pool.invokeAll(tasks);
-        assertEquals(results.get(0),"2202112030033001233");
-      } catch (InterruptedException e) {
-        e.printStackTrace();
-        fail("Test threw an exception.");
-      }
+    List<Future<List<String>>> results = pool.invokeAll(tasks);
+    assertEquals(results.get(0), "2202112030033001233");
   }
 }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/ImageDisplayTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/ImageDisplayTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/ImageDisplayTest.java	(revision 36064)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.plugins.streetside.gui;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.awt.GraphicsEnvironment;
@@ -11,21 +11,17 @@
 import javax.swing.JFrame;
 
-import org.junit.Rule;
-import org.junit.Test;
-import org.openstreetmap.josm.plugins.streetside.utils.TestUtil.StreetsideTestRules;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.junit.jupiter.api.Test;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Tests {@link StreetsideImageDisplay}
  */
-public class ImageDisplayTest {
-
-  @Rule
-  public JOSMTestRules rules = new StreetsideTestRules().preferences();
+@BasicPreferences
+class ImageDisplayTest {
 
   private static final BufferedImage DUMMY_IMAGE = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
 
   @Test
-  public void testImagePersistence() {
+  void testImagePersistence() {
     StreetsideImageDisplay display = new StreetsideImageDisplay();
     display.setImage(DUMMY_IMAGE, null);
@@ -39,5 +35,5 @@
 
   @Test
-  public void testMouseWheelMoved() {
+  void testMouseWheelMoved() {
     if (GraphicsEnvironment.isHeadless()) {
       return;
@@ -65,5 +61,5 @@
    */
   @Test
-  public void testMouseClicked() {
+  void testMouseClicked() {
     if (GraphicsEnvironment.isHeadless()) {
       return;
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/StreetsidePreferenceSettingTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/StreetsidePreferenceSettingTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/StreetsidePreferenceSettingTest.java	(revision 36064)
@@ -1,6 +1,5 @@
 package org.openstreetmap.josm.plugins.streetside.gui;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.openstreetmap.josm.plugins.streetside.utils.TestUtil.getPrivateFieldValue;
 
@@ -11,23 +10,19 @@
 import javax.swing.SpinnerNumberModel;
 
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.preferences.BooleanProperty;
 import org.openstreetmap.josm.data.preferences.StringProperty;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 import org.openstreetmap.josm.plugins.streetside.io.download.StreetsideDownloader.DOWNLOAD_MODE;
-import org.openstreetmap.josm.plugins.streetside.utils.TestUtil.StreetsideTestRules;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.Main;
 
-public class StreetsidePreferenceSettingTest {
-
-  @Rule
-  public JOSMTestRules rules = new StreetsideTestRules().main();
-
+@Main
+@Disabled
+class StreetsidePreferenceSettingTest {
   // TODO: repair broken unit test from Mapillary
-  @Ignore
   @Test
-  public void testAddGui() {
+  void testAddGui() {
     if (GraphicsEnvironment.isHeadless()) {
       return;
@@ -42,14 +37,12 @@
   }
 
-  @Ignore
   @Test
-  public void testIsExpert() {
-    assertFalse(new StreetsidePreferenceSetting().isExpert());
+  void testIsExpert() {
+    Assertions.assertFalse(new StreetsidePreferenceSetting().isExpert());
   }
 
   @SuppressWarnings("unchecked")
-  @Ignore
   @Test
-  public void testOk() {
+  void testOk() {
     StreetsidePreferenceSetting settings = new StreetsidePreferenceSetting();
 
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/boilerplate/SelectableLabelTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/boilerplate/SelectableLabelTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/boilerplate/SelectableLabelTest.java	(revision 36064)
@@ -2,12 +2,13 @@
 package org.openstreetmap.josm.plugins.streetside.gui.boilerplate;
 
-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 org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class SelectableLabelTest {
+
+class SelectableLabelTest {
   @Test
-  public void test() {
+  void testSelectableLabel() {
     SelectableLabel l1 = new SelectableLabel();
     assertFalse(l1.isEditable());
@@ -15,5 +16,4 @@
     assertTrue(l2.getText().contains("some text"));
     assertFalse(l2.isEditable());
-
   }
 }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/history/StreetsideRecordTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/history/StreetsideRecordTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/history/StreetsideRecordTest.java	(revision 36064)
@@ -2,6 +2,7 @@
 package org.openstreetmap.josm.plugins.streetside.history;
 
-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.assertThrows;
 
 import java.util.Arrays;
@@ -9,8 +10,7 @@
 import java.util.concurrent.ConcurrentSkipListSet;
 
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.plugins.streetside.StreetsideAbstractImage;
@@ -22,6 +22,6 @@
 import org.openstreetmap.josm.plugins.streetside.history.commands.CommandUnjoin;
 import org.openstreetmap.josm.plugins.streetside.history.commands.StreetsideCommand;
-import org.openstreetmap.josm.plugins.streetside.utils.TestUtil.StreetsideTestRules;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.Main;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -30,8 +30,8 @@
  * @author nokutu
  */
-public class StreetsideRecordTest {
-
-  @Rule
-  public JOSMTestRules rules = new StreetsideTestRules().main().projection();
+@Main
+@Projection
+@Disabled
+class StreetsideRecordTest {
 
   private StreetsideRecord record;
@@ -44,5 +44,5 @@
    * objects.
    */
-  @Before
+  @BeforeEach
   public void setUp() {
     record = new StreetsideRecord();
@@ -58,7 +58,6 @@
    * Test commands in general.
    */
-  @Ignore
-  @Test
-  public void commandTest() {
+  @Test
+  void testCommand() {
     StreetsideCommand cmd12 = new CommandMove(
             new ConcurrentSkipListSet<>(Arrays.asList(img1, img2)),
@@ -115,7 +114,6 @@
    * Tests {@link CommandMove} class.
    */
-  @Ignore
-  @Test
-  public void commandMoveTest() {
+  @Test
+  void testCommandMove() {
     CommandMove cmd1 = new CommandMove(
             new ConcurrentSkipListSet<>(Arrays.asList(img1, img2)),
@@ -150,7 +148,6 @@
    * Tests {@link CommandTurn} class.
    */
-  @Ignore
-  @Test
-  public void commandTurnTest() {
+  @Test
+  void testCommandTurn() {
     CommandTurn cmd1 = new CommandTurn(
             new ConcurrentSkipListSet<>(Arrays.asList(img1, img2)),
@@ -182,7 +179,6 @@
    * Tests {@link CommandJoin} class.
    */
-  @Ignore
-  @Test
-  public void commandJoinClass() {
+  @Test
+  void testCommandJoinClass() {
     CommandJoin cmd1 = new CommandJoin(img1, img2);
     CommandJoin cmd2 = new CommandJoin(img2, img3);
@@ -199,14 +195,12 @@
   }
 
-  @Ignore
-  @Test(expected=NullPointerException.class)
-  public void commandJoinNull1() {
-    new CommandJoin(img1, null);
-  }
-
-  @Ignore
-  @Test(expected=NullPointerException.class)
-  public void commandJoinNull2() {
-    new CommandJoin(null, img1);
+  @Test
+  void testCommandJoinNull1() {
+    assertThrows(NullPointerException.class, () -> new CommandJoin(img1, null));
+  }
+
+  @Test
+  void commandJoinNull2() {
+    assertThrows(NullPointerException.class, () -> new CommandJoin(null, img1));
   }
 
@@ -214,7 +208,6 @@
    * Tests {@link CommandUnjoin} class.
    */
-  @Ignore
-  @Test
-  public void commandUnjoinClass() {
+  @Test
+  void testCommandUnjoinClass() {
     CommandJoin join1 = new CommandJoin(img1, img2);
     CommandJoin join2 = new CommandJoin(img2, img3);
@@ -237,10 +230,6 @@
     assertEquals(1, img2.getSequence().getImages().size());
 
-    try {
-      record.addCommand(new CommandUnjoin(Arrays.asList(new StreetsideAbstractImage[]{img1, img2, img3})));
-      fail();
-    } catch (IllegalArgumentException e) {
-      // Expected output.
-    }
+    CommandUnjoin command = new CommandUnjoin(Arrays.asList(new StreetsideAbstractImage[]{img1, img2, img3}));
+    assertThrows(IllegalArgumentException.class, () -> record.addCommand(command));
   }
 }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnableTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnableTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnableTest.java	(revision 36064)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.plugins.streetside.io.download;
 
-import static org.junit.Assert.assertEquals;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.lang.reflect.Field;
@@ -9,19 +10,14 @@
 import java.util.function.Function;
 
-import org.junit.AfterClass;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.streetside.StreetsideLayer;
 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties;
-import org.openstreetmap.josm.plugins.streetside.utils.TestUtil.StreetsideTestRules;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.LayerManager;
 
-public class SequenceDownloadRunnableTest {
-
-  @Rule
-  public JOSMTestRules rules = new StreetsideTestRules();
+@Disabled
+@LayerManager
+class SequenceDownloadRunnableTest {
 
   private static final Function<Bounds, URL> SEARCH_SEQUENCES_URL_GEN = b -> {
@@ -30,24 +26,17 @@
   private Field urlGenField;
 
-  @AfterClass
-  public static void tearDown() {
-    MainApplication.getLayerManager().resetState();
-  }
 
-  @Ignore
   @Test
-  public void testRun1() throws IllegalArgumentException, IllegalAccessException {
+  void testRun1() throws IllegalArgumentException, IllegalAccessException {
     testNumberOfDecodedImages(4, SEARCH_SEQUENCES_URL_GEN, new Bounds(7.246497, 16.432955, 7.249027, 16.432976));
   }
 
-  @Ignore
   @Test
-  public void testRun2() throws IllegalArgumentException, IllegalAccessException {
+  void testRun2() throws IllegalArgumentException, IllegalAccessException {
     testNumberOfDecodedImages(0, SEARCH_SEQUENCES_URL_GEN, new Bounds(0, 0, 0, 0));
   }
 
-  @Ignore
   @Test
-  public void testRun3() throws IllegalArgumentException, IllegalAccessException {
+  void testRun3() throws IllegalArgumentException, IllegalAccessException {
     testNumberOfDecodedImages(0, b -> {
       try { return new URL("https://streetside/nonexistentURL"); } catch (MalformedURLException e) { return null; }
@@ -55,14 +44,12 @@
   }
 
-  @Ignore
   @Test
-  public void testRun4() throws IllegalArgumentException, IllegalAccessException {
+  void testRun4() throws IllegalArgumentException, IllegalAccessException {
     StreetsideProperties.CUT_OFF_SEQUENCES_AT_BOUNDS.put(true);
     testNumberOfDecodedImages(4, SEARCH_SEQUENCES_URL_GEN, new Bounds(7.246497, 16.432955, 7.249027, 16.432976));
   }
 
-  @Ignore
   @Test
-  public void testRun5() throws IllegalArgumentException, IllegalAccessException {
+  void testRun5() throws IllegalArgumentException, IllegalAccessException {
     StreetsideProperties.CUT_OFF_SEQUENCES_AT_BOUNDS.put(true);
     testNumberOfDecodedImages(0, SEARCH_SEQUENCES_URL_GEN, new Bounds(0, 0, 0, 0));
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/ImageUtilTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/ImageUtilTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/ImageUtilTest.java	(revision 36064)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.plugins.streetside.utils;
 
-import static org.junit.Assert.assertEquals;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.awt.image.BufferedImage;
@@ -8,15 +9,16 @@
 import javax.swing.ImageIcon;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ImageUtilTest {
+
+class ImageUtilTest {
 
   @Test
-  public void testUtilityClass() {
+  void testUtilityClass() {
     TestUtil.testUtilityClass(ImageUtil.class);
   }
 
   @Test
-  public void testScaleImageIcon() {
+  void testScaleImageIcon() {
     ImageIcon largeLandscape = new ImageIcon(new BufferedImage(72, 60, BufferedImage.TYPE_4BYTE_ABGR));
     ImageIcon largePortrait = new ImageIcon(new BufferedImage(56, 88, BufferedImage.TYPE_4BYTE_ABGR));
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/PluginStateTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/PluginStateTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/PluginStateTest.java	(revision 36064)
@@ -2,9 +2,12 @@
 package org.openstreetmap.josm.plugins.streetside.utils;
 
-import static org.junit.Assert.assertEquals;
+
+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 javax.swing.JOptionPane;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
@@ -16,5 +19,5 @@
  * @see PluginState
  */
-public class PluginStateTest {
+class PluginStateTest {
 
   /**
@@ -22,14 +25,14 @@
    */
   @Test
-  public void downloadTest() {
-    assertEquals(false, PluginState.isDownloading());
+  void testDownload() {
+    assertFalse(PluginState.isDownloading());
     PluginState.startDownload();
-    assertEquals(true, PluginState.isDownloading());
+    assertTrue(PluginState.isDownloading());
     PluginState.startDownload();
-    assertEquals(true, PluginState.isDownloading());
+    assertTrue(PluginState.isDownloading());
     PluginState.finishDownload();
-    assertEquals(true, PluginState.isDownloading());
+    assertTrue(PluginState.isDownloading());
     PluginState.finishDownload();
-    assertEquals(false, PluginState.isDownloading());
+    assertFalse(PluginState.isDownloading());
   }
 
@@ -38,5 +41,5 @@
    */
   @Test
-  public void uploadTest() {
+  void testUpload() {
     TestUtils.assumeWorkingJMockit();
     JOptionPaneSimpleMocker jopsMocker = new JOptionPaneSimpleMocker();
@@ -45,14 +48,14 @@
             JOptionPane.OK_OPTION
         );
-    assertEquals(false, PluginState.isUploading());
+    assertFalse(PluginState.isUploading());
     PluginState.addImagesToUpload(2);
     assertEquals(2, PluginState.getImagesToUpload());
     assertEquals(0, PluginState.getImagesUploaded());
-    assertEquals(true, PluginState.isUploading());
+    assertTrue(PluginState.isUploading());
     PluginState.imageUploaded();
     assertEquals(1, PluginState.getImagesUploaded());
-    assertEquals(true, PluginState.isUploading());
+    assertTrue(PluginState.isUploading());
     PluginState.imageUploaded();
-    assertEquals(false, PluginState.isUploading());
+    assertFalse(PluginState.isUploading());
     assertEquals(2, PluginState.getImagesToUpload());
     assertEquals(2, PluginState.getImagesUploaded());
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideColorSchemeTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideColorSchemeTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideColorSchemeTest.java	(revision 36064)
@@ -2,19 +2,21 @@
 package org.openstreetmap.josm.plugins.streetside.utils;
 
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+
 import javax.swing.JComponent;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class StreetsideColorSchemeTest {
+class StreetsideColorSchemeTest {
 
   @Test
-  public void testUtilityClass() {
+  void testUtilityClass() {
     TestUtil.testUtilityClass(StreetsideColorScheme.class);
   }
 
   @Test
-  public void testStyleAsDefaultPanel() {
-    StreetsideColorScheme.styleAsDefaultPanel();
-    StreetsideColorScheme.styleAsDefaultPanel((JComponent[]) null);
+  void testStyleAsDefaultPanel() {
+    assertDoesNotThrow(() -> StreetsideColorScheme.styleAsDefaultPanel());
+    assertDoesNotThrow(() -> StreetsideColorScheme.styleAsDefaultPanel((JComponent[]) null));
   }
 }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsidePropertiesTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsidePropertiesTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsidePropertiesTest.java	(revision 36064)
@@ -2,17 +2,9 @@
 package org.openstreetmap.josm.plugins.streetside.utils;
 
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.openstreetmap.josm.plugins.streetside.utils.TestUtil.StreetsideTestRules;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.junit.jupiter.api.Test;
 
 public class StreetsidePropertiesTest {
-
-  @Rule
-  public JOSMTestRules rules = new StreetsideTestRules();
-
   @Test
-  public void test() {
+  public void testUtilityClass() {
     TestUtil.testUtilityClass(StreetsideProperties.class);
   }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURLTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURLTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURLTest.java	(revision 36064)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.plugins.streetside.utils;
 
-import static org.junit.Assert.assertEquals;
-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.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.lang.reflect.InvocationTargetException;
@@ -11,8 +11,9 @@
 import java.net.URL;
 
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
-public class StreetsideURLTest {
+class StreetsideURLTest {
   // TODO: replace with Streetside URL @rrh
   private static final String CLIENT_ID_QUERY_PART = "client_id=T1Fzd20xZjdtR0s1VDk5OFNIOXpYdzoxNDYyOGRkYzUyYTFiMzgz";
@@ -44,17 +45,14 @@
 
 	@Test
-    public void testParseNextFromHeaderValue() throws MalformedURLException {
+    void testParseNextFromHeaderValue() throws MalformedURLException {
       String headerVal =
         "<https://a.streetside.com/v3/sequences?page=1&per_page=200&client_id=TG1sUUxGQlBiYWx2V05NM0pQNUVMQTo2NTU3NTBiNTk1NzM1Y2U2>; rel=\"first\", " +
         "<https://a.streetside.com/v3/sequences?page=2&per_page=200&client_id=TG1sUUxGQlBiYWx2V05NM0pQNUVMQTo2NTU3NTBiNTk1NzM1Y2U2>; rel=\"prev\", " +
         "<https://a.streetside.com/v3/sequences?page=4&per_page=200&client_id=TG1sUUxGQlBiYWx2V05NM0pQNUVMQTo2NTU3NTBiNTk1NzM1Y2U2>; rel=\"next\"";
-      assertEquals(
-        new URL("https://a.streetside.com/v3/sequences?page=4&per_page=200&client_id=TG1sUUxGQlBiYWx2V05NM0pQNUVMQTo2NTU3NTBiNTk1NzM1Y2U2"),
-        StreetsideURL.APIv3.parseNextFromLinkHeaderValue(headerVal)
-      );
+      assertEquals(new URL("https://a.streetside.com/v3/sequences?page=4&per_page=200&client_id=TG1sUUxGQlBiYWx2V05NM0pQNUVMQTo2NTU3NTBiNTk1NzM1Y2U2"), StreetsideURL.APIv3.parseNextFromLinkHeaderValue(headerVal));
     }
 
     @Test
-    public void testParseNextFromHeaderValue2() throws MalformedURLException {
+    void testParseNextFromHeaderValue2() throws MalformedURLException {
       String headerVal =
         "<https://urlFirst>; rel=\"first\", " +
@@ -66,11 +64,11 @@
 
     @Test
-    public void testParseNextFromHeaderValueNull() {
-      assertEquals(null, StreetsideURL.APIv3.parseNextFromLinkHeaderValue(null));
+    void testParseNextFromHeaderValueNull() {
+      assertNull(StreetsideURL.APIv3.parseNextFromLinkHeaderValue(null));
     }
 
     @Test
-    public void testParseNextFromHeaderValueMalformed() {
-      assertEquals(null, StreetsideURL.APIv3.parseNextFromLinkHeaderValue("<###>; rel=\"next\", blub"));
+    void testParseNextFromHeaderValueMalformed() {
+      assertNull(StreetsideURL.APIv3.parseNextFromLinkHeaderValue("<###>; rel=\"next\", blub"));
     }
 
@@ -85,21 +83,18 @@
   }*/
 
-  @Ignore
+  @Disabled
   @Test
-  public void testBrowseImageURL() throws MalformedURLException {
-    assertEquals(
-        new URL("https://www.streetside.com/map/im/1234567890123456789012"),
-        StreetsideURL.MainWebsite.browseImage("1234567890123456789012")
-    );
+  void testBrowseImageURL() throws MalformedURLException {
+    assertEquals(new URL("https://www.streetside.com/map/im/1234567890123456789012"), StreetsideURL.MainWebsite.browseImage("1234567890123456789012"));
   }
 
-  @Test(expected = IllegalArgumentException.class)
-  public void testIllegalBrowseImageURL() {
-    StreetsideURL.MainWebsite.browseImage(null);
+  @Test
+  void testIllegalBrowseImageURL() {
+    assertThrows(IllegalArgumentException.class, () -> StreetsideURL.MainWebsite.browseImage(null));
   }
 
-  @Ignore
+  @Disabled
   @Test
-  public void testConnectURL() {
+  void testConnectURL() {
     /*assertUrlEquals(
         StreetsideURL.MainWebsite.connect("http://redirect-host/ä"),
@@ -128,7 +123,7 @@
   }
 
-  @Ignore
+  @Disabled
   @Test
-  public void testUploadSecretsURL() throws MalformedURLException {
+  void testUploadSecretsURL() throws MalformedURLException {
     /*assertEquals(
         new URL("https://a.streetside.com/v2/me/uploads/secrets?"+CLIENT_ID_QUERY_PART),
@@ -137,7 +132,7 @@
   }
 
-  @Ignore
+  @Disabled
   @Test
-  public void testUserURL() throws MalformedURLException {
+  void testUserURL() throws MalformedURLException {
     /*assertEquals(
         new URL("https://a.streetside.com/v3/me?"+CLIENT_ID_QUERY_PART),
@@ -147,14 +142,14 @@
 
   @Test
-  public void testString2MalformedURL()
+  void testString2MalformedURL()
       throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
     Method method = StreetsideURL.class.getDeclaredMethod("string2URL", String[].class);
     method.setAccessible(true);
-    assertNull(method.invoke(null, new Object[]{new String[]{"malformed URL"}})); // this simply invokes string2URL("malformed URL")
-    assertNull(method.invoke(null, new Object[]{null})); // invokes string2URL(null)
+    Assertions.assertNull(method.invoke(null, new Object[]{new String[]{"malformed URL"}})); // this simply invokes string2URL("malformed URL")
+    Assertions.assertNull(method.invoke(null, new Object[]{null})); // invokes string2URL(null)
   }
 
   @Test
-  public void testUtilityClass() {
+  void testUtilityClass() {
     TestUtil.testUtilityClass(StreetsideURL.class);
     TestUtil.testUtilityClass(StreetsideURL.APIv3.class);
@@ -173,8 +168,5 @@
         parameterIsPresent |= actualParams[acIndex].equals(expectedParams[exIndex]);
       }
-      assertTrue(
-          expectedParams[exIndex] + " was expected in the query string of " + actualUrl.toString() + " but wasn't there.",
-          parameterIsPresent
-      );
+      Assertions.assertTrue(parameterIsPresent, expectedParams[exIndex] + " was expected in the query string of " + actualUrl.toString() + " but wasn't there.");
     }
   }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideUtilsTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideUtilsTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/StreetsideUtilsTest.java	(revision 36064)
@@ -2,9 +2,9 @@
 package org.openstreetmap.josm.plugins.streetside.utils;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import org.apache.commons.imaging.common.RationalNumber;
 import org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -15,8 +15,8 @@
  *
  */
-public class StreetsideUtilsTest {
+class StreetsideUtilsTest {
 
   @Test
-  public void testUtilityClass() {
+  void testUtilityClass() {
     TestUtil.testUtilityClass(StreetsideUtils.class);
   }
@@ -27,5 +27,5 @@
    */
   @Test
-  public void degMinSecToDoubleTest() {
+  void testDegMinSecToDouble() {
     RationalNumber[] num = new RationalNumber[3];
     num[0] = new RationalNumber(1, 1);
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/TestUtil.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/TestUtil.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/TestUtil.java	(revision 36064)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.plugins.streetside.utils;
 
-import static org.junit.Assert.assertEquals;
-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.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.awt.GraphicsEnvironment;
@@ -15,6 +15,9 @@
 
 import org.junit.runners.model.InitializationError;
-
+import org.openstreetmap.josm.plugins.streetside.StreetsidePlugin;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.spi.preferences.MemoryPreferences;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Utils;
@@ -27,4 +30,16 @@
   private TestUtil() {
     // Prevent instantiation
+  }
+
+  /**
+   * Check if we can load images
+   * @return {@code true} if the {@link StreetsidePlugin#LOGO} could be loaded
+   */
+  public static boolean cannotLoadImages() {
+    // The class-level @DisabledIf seems to be run prior to any possible setup code
+    if (Config.getPref() == null) {
+      Config.setPreferencesInstance(new MemoryPreferences());
+    }
+    return new ImageProvider("streetside-logo").setOptional(true).getResource() == null;
   }
 
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/api/JsonDecoderTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/api/JsonDecoderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/api/JsonDecoderTest.java	(revision 36064)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.plugins.streetside.utils.api;
 
-import static org.junit.Assert.assertNull;
+
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.io.ByteArrayInputStream;
@@ -11,17 +12,16 @@
 import javax.json.JsonObject;
 
-import org.junit.Test;
-
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.plugins.streetside.utils.TestUtil;
 
-public class JsonDecoderTest {
+class JsonDecoderTest {
 
   @Test
-  public void testUtilityClass() {
+  void testUtilityClass() {
     TestUtil.testUtilityClass(JsonDecoder.class);
   }
 
   @Test
-  public void testDecodeDoublePair() {
+  void testDecodeDoublePair() {
     assertNull(JsonDecoder.decodeDoublePair(null));
   }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/api/JsonSequencesDecoderTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/api/JsonSequencesDecoderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/api/JsonSequencesDecoderTest.java	(revision 36064)
@@ -2,7 +2,6 @@
 package org.openstreetmap.josm.plugins.streetside.utils.api;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.openstreetmap.josm.plugins.streetside.utils.api.JsonDecoderTest.assertDecodesToNull;
 
@@ -19,6 +18,7 @@
 import javax.json.JsonValue;
 
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.plugins.streetside.StreetsideImage;
@@ -27,9 +27,9 @@
 import org.openstreetmap.josm.plugins.streetside.utils.TestUtil;
 
-public class JsonSequencesDecoderTest {
-
-  @Ignore
-  @Test
-  public void testDecodeSequences() {
+class JsonSequencesDecoderTest {
+
+  @Disabled
+  @Test
+  void testDecodeSequences() {
     Collection<StreetsideSequence> exampleSequences = JsonDecoder.decodeFeatureCollection(
       Json.createReader(this.getClass().getResourceAsStream("test/data/api/v3/responses/searchSequences.json")).readObject(),
@@ -51,8 +51,8 @@
     assertEquals(329.94820000000004, seq.getImages().get(3).getHe(), 1e-10);
 
-    assertEquals(new LatLon(7.246497, 16.432958),  seq.getImages().get(0).getLatLon());
-    assertEquals(new LatLon(7.246567, 16.432955),  seq.getImages().get(1).getLatLon());
-    assertEquals(new LatLon(7.248372, 16.432971),  seq.getImages().get(2).getLatLon());
-    assertEquals(new LatLon(7.249027, 16.432976),  seq.getImages().get(3).getLatLon());
+    assertEquals(new LatLon(7.246497, 16.432958), seq.getImages().get(0).getLatLon());
+    assertEquals(new LatLon(7.246567, 16.432955), seq.getImages().get(1).getLatLon());
+    assertEquals(new LatLon(7.248372, 16.432971), seq.getImages().get(2).getLatLon());
+    assertEquals(new LatLon(7.249027, 16.432976), seq.getImages().get(3).getLatLon());
 
     assertEquals(1_457_963_093_860L, seq.getCd()); // 2016-03-14T13:44:53.860 UTC
@@ -60,5 +60,5 @@
 
   @Test
-  public void testDecodeSequencesInvalid() {
+  void testDecodeSequencesInvalid() {
     // null input
     assertEquals(0, JsonDecoder.decodeFeatureCollection(null, JsonSequencesDecoder::decodeSequence).size());
@@ -76,21 +76,18 @@
 
   @Test
-  public void testDecodeSequencesWithArbitraryObjectAsFeature() {
+  void testDecodeSequencesWithArbitraryObjectAsFeature() {
     assertNumberOfDecodedSequences(0, "{\"type\": \"FeatureCollection\", \"features\": [{}]}");
   }
 
   private static void assertNumberOfDecodedSequences(int expectedNumberOfSequences, String jsonString) {
-    assertEquals(
-      expectedNumberOfSequences,
-      JsonDecoder.decodeFeatureCollection(
-        Json.createReader(new ByteArrayInputStream(jsonString.getBytes(StandardCharsets.UTF_8))).readObject(),
-        JsonSequencesDecoder::decodeSequence
-      ).size()
-    );
-  }
-
-  @Ignore
-  @Test
-  public void testDecodeSequence() {
+    assertEquals(expectedNumberOfSequences, JsonDecoder.decodeFeatureCollection(
+      Json.createReader(new ByteArrayInputStream(jsonString.getBytes(StandardCharsets.UTF_8))).readObject(),
+      JsonSequencesDecoder::decodeSequence
+    ).size());
+  }
+
+  @Disabled
+  @Test
+  void testDecodeSequence() {
     StreetsideSequence exampleSequence = JsonSequencesDecoder.decodeSequence(
       Json.createReader(this.getClass().getResourceAsStream("/api/v3/responses/sequence.json")).readObject()
@@ -100,18 +97,12 @@
     assertEquals(2, exampleSequence.getImages().size());
 
-    assertEquals(
-      new StreetsideImage("76P0YUrlDD_lF6J7Od3yoA", new LatLon(16.43279, 7.246085), 96.71454),
-      exampleSequence.getImages().get(0)
-    );
-    assertEquals(
-      new StreetsideImage("Ap_8E0BwoAqqewhJaEbFyQ", new LatLon(16.432799, 7.246082), 96.47705000000002),
-      exampleSequence.getImages().get(1)
-    );
-  }
-
-  @Test
-  public void testDecodeSequenceInvalid() {
+    assertEquals(new StreetsideImage("76P0YUrlDD_lF6J7Od3yoA", new LatLon(16.43279, 7.246085), 96.71454), exampleSequence.getImages().get(0));
+    assertEquals(new StreetsideImage("Ap_8E0BwoAqqewhJaEbFyQ", new LatLon(16.432799, 7.246082), 96.47705000000002), exampleSequence.getImages().get(1));
+  }
+
+  @Test
+  void testDecodeSequenceInvalid() {
     // null input
-    assertNull(JsonSequencesDecoder.decodeSequence(null));
+    Assertions.assertNull(JsonSequencesDecoder.decodeSequence(null));
     // `properties` key is not set
     assertDecodesToNull(JsonSequencesDecoder::decodeSequence, "{\"type\": \"Feature\"}");
@@ -150,17 +141,14 @@
    */
   @Test
-  public void testDecodeJsonArray()
+  void testDecodeJsonArray()
       throws NoSuchMethodException, SecurityException, IllegalAccessException,
       IllegalArgumentException, InvocationTargetException {
     Method method = JsonSequencesDecoder.class.getDeclaredMethod("decodeJsonArray", JsonArray.class, Function.class, Class.class);
     method.setAccessible(true);
-    assertEquals(
-      0,
-      ((String[]) method.invoke(null, null, (Function<JsonValue, String>) val -> null, String.class)).length
-    );
-  }
-
-  @Test
-  public void testDecodeCoordinateProperty() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+    assertEquals(0, ((String[]) method.invoke(null, null, (Function<JsonValue, String>) val -> null, String.class)).length);
+  }
+
+  @Test
+  void testDecodeCoordinateProperty() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
     Method decodeCoordinateProperty = JsonSequencesDecoder.class.getDeclaredMethod(
       "decodeCoordinateProperty",
@@ -172,21 +160,15 @@
     decodeCoordinateProperty.setAccessible(true);
 
-    assertEquals(
-      0,
-      ((String[]) decodeCoordinateProperty.invoke(
-        null, null, "key", (Function<JsonValue, String>) val -> "string", String.class
-      )).length
-    );
-
-    assertEquals(
-      0,
-      ((String[]) decodeCoordinateProperty.invoke(
-        null, JsonUtil.string2jsonObject("{\"coordinateProperties\":{\"key\":0}}"), "key", (Function<JsonValue, String>) val -> "string", String.class
-      )).length
-    );
-  }
-
-  @Test
-  public void testDecodeLatLons()
+    assertEquals(0, ((String[]) decodeCoordinateProperty.invoke(
+      null, null, "key", (Function<JsonValue, String>) val -> "string", String.class
+    )).length);
+
+    assertEquals(0, ((String[]) decodeCoordinateProperty.invoke(
+      null, JsonUtil.string2jsonObject("{\"coordinateProperties\":{\"key\":0}}"), "key", (Function<JsonValue, String>) val -> "string", String.class
+    )).length);
+  }
+
+  @Test
+  void testDecodeLatLons()
       throws NoSuchMethodException, SecurityException, IllegalAccessException,
       IllegalArgumentException, InvocationTargetException {
@@ -206,11 +188,11 @@
     )).readObject());
     assertEquals(3, example.length);
-    assertNull(example[0]);
-    assertNull(example[1]);
-    assertNull(example[2]);
-  }
-
-  @Test
-  public void testUtilityClass() {
+    Assertions.assertNull(example[0]);
+    Assertions.assertNull(example[1]);
+    Assertions.assertNull(example[2]);
+  }
+
+  @Test
+  void testUtilityClass() {
     TestUtil.testUtilityClass(JsonSequencesDecoder.class);
   }
Index: /applications/editors/josm/plugins/alignways/test/unit/org/openstreetmap/josm/plugins/alignways/geometry/AlignWaysGeomLineTest.java
===================================================================
--- /applications/editors/josm/plugins/alignways/test/unit/org/openstreetmap/josm/plugins/alignways/geometry/AlignWaysGeomLineTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/alignways/test/unit/org/openstreetmap/josm/plugins/alignways/geometry/AlignWaysGeomLineTest.java	(revision 36064)
@@ -2,8 +2,11 @@
 package org.openstreetmap.josm.plugins.alignways.geometry;
 
-import static org.junit.Assert.assertTrue;
 
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.plugins.alignways.geometry.AlignWaysGeomLine.IntersectionStatus;
 
@@ -11,5 +14,5 @@
  * Tests of {@link AlignWaysGeomLine}
  */
-public class AlignWaysGeomLineTest {
+class AlignWaysGeomLineTest {
     private AlignWaysGeomLine line_x1y1x2y2, line_par_x1y1x2y2;
     private AlignWaysGeomLine line_abc;
@@ -18,6 +21,6 @@
     private AlignWaysGeomLine line_horiz, line_vert;
 
-    @Before
-    public void setUp() {
+    @BeforeEach
+    void setUp() {
         line_x1y1x2y2 = new AlignWaysGeomLine(-2.0, -1.0, 4.0, 3.0);
         line_abc = new AlignWaysGeomLine(2.0/3, -1.0, 1.0/3);
@@ -30,62 +33,61 @@
 
     @Test
-    public void LineLineEquiv() {
-        assertTrue(line_x1y1x2y2.equals(line_line));
+    void testLineLineEquiv() {
+        assertEquals(line_x1y1x2y2, line_line);
     }
 
     @Test
-    public void LineAbcLineEquiv() {
-        assertTrue(line_x1y1x2y2.equals(line_abc));
+    void testLineAbcLineEquiv() {
+        assertEquals(line_x1y1x2y2, line_abc);
     }
 
     @Test
-    public void LineMbLineEquiv() {
-        assertTrue(line_x1y1x2y2.equals(line_mb));
+    void testLineMbLineEquiv() {
+        assertEquals(line_x1y1x2y2, line_mb);
     }
 
     @Test
-    public void LineAbcMbEquiv() {
-        assertTrue(line_abc.equals(line_mb));
+    void testLineAbcMbEquiv() {
+        assertEquals(line_abc, line_mb);
     }
 
     @Test
-    public void LineLineParallel() {
+    void testLineLineParallel() {
         line_x1y1x2y2.getIntersection(line_par_x1y1x2y2);
-        assertTrue(line_x1y1x2y2.getIntersectionStatus() == IntersectionStatus.LINES_PARALLEL);
+        assertSame(line_x1y1x2y2.getIntersectionStatus(), IntersectionStatus.LINES_PARALLEL);
     }
 
     @Test
-    public void LineAbcOverlap() {
+    void testLineAbcOverlap() {
         line_x1y1x2y2.getIntersection(line_abc);
-        assertTrue(line_x1y1x2y2.getIntersectionStatus() == IntersectionStatus.LINES_OVERLAP);
+        assertSame(line_x1y1x2y2.getIntersectionStatus(), IntersectionStatus.LINES_OVERLAP);
     }
 
     @Test
-    public void LineMbOverlap() {
+    void testLineMbOverlap() {
         line_x1y1x2y2.getIntersection(line_mb);
-        assertTrue(line_x1y1x2y2.getIntersectionStatus() == IntersectionStatus.LINES_OVERLAP);
+        assertSame(line_x1y1x2y2.getIntersectionStatus(), IntersectionStatus.LINES_OVERLAP);
     }
 
     @Test
-    public void AbcMbOverlap() {
+    void testAbcMbOverlap() {
         line_abc.getIntersection(line_mb);
-        assertTrue(line_abc.getIntersectionStatus() == IntersectionStatus.LINES_OVERLAP);
+        assertSame(line_abc.getIntersectionStatus(), IntersectionStatus.LINES_OVERLAP);
     }
 
     @Test
-    public void GetXOnHoriz() {
+    void testGetXOnHoriz() {
         assertTrue(line_horiz.getXonLine(2.0).isNaN());
     }
 
     @Test
-    public void GetYOnVert() {
+    void testGetYOnVert() {
         assertTrue(line_vert.getYonLine(2.0).isNaN());
     }
 
     @Test
-    public void StatusUndefAfterConstruct() throws Exception {
+    void testStatusUndefAfterConstruct() {
         AlignWaysGeomLine newLine = new AlignWaysGeomLine(1.0, 2.0);
-        assertTrue(newLine.getIntersectionStatus() == IntersectionStatus.UNDEFINED);
-
+        assertSame(newLine.getIntersectionStatus(), IntersectionStatus.UNDEFINED);
     }
 
Index: /applications/editors/josm/plugins/cadastre-fr/test/unit/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoRecordTest.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/test/unit/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoRecordTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/cadastre-fr/test/unit/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoRecordTest.java	(revision 36064)
@@ -2,9 +2,9 @@
 package org.openstreetmap.josm.plugins.fr.cadastre.edigeo;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.Arrays;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoRecord.Format;
@@ -16,5 +16,5 @@
  * Unit test of {@link EdigeoRecord}.
  */
-public class EdigeoRecordTest {
+class EdigeoRecordTest {
 
     /**
@@ -22,5 +22,5 @@
      */
     @Test
-    public void testEdigeoRecord() {
+    void testEdigeoRecord() {
         EdigeoRecord r = new EdigeoRecord("SCPCP27:TEST01;SeSD;OBJ;PARCELLE_id");
         assertEquals("SCP", r.name);
@@ -35,5 +35,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(EdigeoRecord.class).usingGetClass()
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/AsyncEventBusTest.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/AsyncEventBusTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/AsyncEventBusTest.java	(revision 36064)
@@ -17,6 +17,6 @@
 package org.openstreetmap.josm.eventbus;
 
-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.util.ArrayList;
@@ -24,7 +24,6 @@
 import java.util.concurrent.Executor;
 
-import org.junit.Before;
-import org.junit.Test;
-import org.openstreetmap.josm.eventbus.AsyncEventBus;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -33,5 +32,5 @@
  * @author Cliff Biffle
  */
-public class AsyncEventBusTest {
+class AsyncEventBusTest {
   private static final String EVENT = "Hello";
 
@@ -41,6 +40,6 @@
   private AsyncEventBus bus;
 
-  @Before
-  public void setUp() throws Exception {
+  @BeforeEach
+  void setUp() {
     executor = new FakeExecutor();
     bus = new AsyncEventBus(executor);
@@ -48,5 +47,5 @@
 
   @Test
-  public void testBasicDistribution() {
+  void testBasicDistribution() {
     StringCatcher catcher = new StringCatcher();
     bus.register(catcher);
@@ -56,14 +55,14 @@
 
     List<String> events = catcher.getEvents();
-    assertTrue("No events should be delivered synchronously.", events.isEmpty());
+    assertTrue(events.isEmpty(), "No events should be delivered synchronously.");
 
     // Now we find the task in our Executor and explicitly activate it.
     List<Runnable> tasks = executor.getTasks();
-    assertEquals("One event dispatch task should be queued.", 1, tasks.size());
+    assertEquals(1, tasks.size(), "One event dispatch task should be queued.");
 
     tasks.get(0).run();
 
-    assertEquals("One event should be delivered.", 1, events.size());
-    assertEquals("Correct string should be delivered.", EVENT, events.get(0));
+    assertEquals(1, events.size(), "One event should be delivered.");
+    assertEquals(EVENT, events.get(0), "Correct string should be delivered.");
   }
 
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/DispatcherTest.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/DispatcherTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/DispatcherTest.java	(revision 36064)
@@ -27,10 +27,6 @@
 import java.util.concurrent.CyclicBarrier;
 
-import org.junit.Ignore;
-import org.junit.Test;
-import org.openstreetmap.josm.eventbus.Dispatcher;
-import org.openstreetmap.josm.eventbus.EventBus;
-import org.openstreetmap.josm.eventbus.Subscribe;
-import org.openstreetmap.josm.eventbus.Subscriber;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -40,5 +36,5 @@
  */
 
-public class DispatcherTest {
+class DispatcherTest {
 
   private final EventBus bus = new EventBus();
@@ -66,6 +62,6 @@
 
   @Test
-  @Ignore("FIXME")
-  public void testPerThreadQueuedDispatcher() {
+  @Disabled("FIXME")
+  void testPerThreadQueuedDispatcher() {
     dispatcher = Dispatcher.perThreadDispatchQueue();
     dispatcher.dispatch(1, integerSubscribers.iterator());
@@ -87,6 +83,6 @@
 
   @Test
-  @Ignore("FIXME")
-  public void testLegacyAsyncDispatcher() {
+  @Disabled("FIXME")
+  void testLegacyAsyncDispatcher() {
     dispatcher = Dispatcher.legacyAsync();
 
@@ -95,32 +91,26 @@
 
     new Thread(
-            new Runnable() {
-              @Override
-              public void run() {
-                try {
-                  barrier.await();
-                } catch (Exception e) {
-                  throw new AssertionError(e);
-                }
+            () -> {
+              try {
+                barrier.await();
+              } catch (Exception e) {
+                throw new AssertionError(e);
+              }
 
-                dispatcher.dispatch(2, integerSubscribers.iterator());
-                latch.countDown();
-              }
+              dispatcher.dispatch(2, integerSubscribers.iterator());
+              latch.countDown();
             })
         .start();
 
     new Thread(
-            new Runnable() {
-              @Override
-              public void run() {
-                try {
-                  barrier.await();
-                } catch (Exception e) {
-                  throw new AssertionError(e);
-                }
+            () -> {
+              try {
+                barrier.await();
+              } catch (Exception e) {
+                throw new AssertionError(e);
+              }
 
-                dispatcher.dispatch("foo", stringSubscribers.iterator());
-                latch.countDown();
-              }
+              dispatcher.dispatch("foo", stringSubscribers.iterator());
+              latch.countDown();
             })
         .start();
@@ -135,6 +125,6 @@
 
   @Test
-  @Ignore("FIXME")
-  public void testImmediateDispatcher() {
+  @Disabled("FIXME")
+  void testImmediateDispatcher() {
     dispatcher = Dispatcher.immediate();
     dispatcher.dispatch(1, integerSubscribers.iterator());
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/EventBusTest.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/EventBusTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/EventBusTest.java	(revision 36064)
@@ -17,9 +17,10 @@
 package org.openstreetmap.josm.eventbus;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -29,11 +30,6 @@
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.junit.Before;
-import org.junit.Test;
-import org.openstreetmap.josm.eventbus.DeadEvent;
-import org.openstreetmap.josm.eventbus.EventBus;
-import org.openstreetmap.josm.eventbus.Subscribe;
-import org.openstreetmap.josm.eventbus.SubscriberExceptionContext;
-import org.openstreetmap.josm.eventbus.SubscriberExceptionHandler;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -42,5 +38,5 @@
  * @author Cliff Biffle
  */
-public class EventBusTest {
+class EventBusTest {
   private static final String EVENT = "Hello";
   private static final String BUS_IDENTIFIER = "test-bus";
@@ -48,11 +44,11 @@
   private EventBus bus;
 
-  @Before
-  public void setUp() throws Exception {
+  @BeforeEach
+  void setUp() {
     bus = new EventBus(BUS_IDENTIFIER);
   }
 
   @Test
-  public void testBasicCatcherDistribution() {
+  void testBasicCatcherDistribution() {
     StringCatcher catcher = new StringCatcher();
     bus.register(catcher);
@@ -60,6 +56,6 @@
 
     List<String> events = catcher.getEvents();
-    assertEquals("Only one event should be delivered.", 1, events.size());
-    assertEquals("Correct string should be delivered.", EVENT, events.get(0));
+    assertEquals(1, events.size(), "Only one event should be delivered.");
+    assertEquals(EVENT, events.get(0), "Correct string should be delivered.");
   }
 
@@ -71,5 +67,5 @@
    */
   @Test
-  public void testPolymorphicDistribution() {
+  void testPolymorphicDistribution() {
     // Three catchers for related types String, Object, and Comparable<?>.
     // String isa Object
@@ -101,5 +97,5 @@
     // Two additional event types: Object and Comparable<?> (played by Integer)
     Object objEvent = new Object();
-    Object compEvent = new Integer(6);
+    Object compEvent = 6;
 
     bus.post(EVENT);
@@ -109,23 +105,21 @@
     // Check the StringCatcher...
     List<String> stringEvents = stringCatcher.getEvents();
-    assertEquals("Only one String should be delivered.", 1, stringEvents.size());
-    assertEquals("Correct string should be delivered.", EVENT, stringEvents.get(0));
+    assertEquals(1, stringEvents.size(), "Only one String should be delivered.");
+    assertEquals(EVENT, stringEvents.get(0), "Correct string should be delivered.");
 
     // Check the Catcher<Object>...
-    assertEquals("Three Objects should be delivered.", 3, objectEvents.size());
-    assertEquals("String fixture must be first object delivered.", EVENT, objectEvents.get(0));
-    assertEquals("Object fixture must be second object delivered.", objEvent, objectEvents.get(1));
-    assertEquals(
-        "Comparable fixture must be thirdobject delivered.", compEvent, objectEvents.get(2));
+    assertEquals(3, objectEvents.size(), "Three Objects should be delivered.");
+    assertEquals(EVENT, objectEvents.get(0), "String fixture must be first object delivered.");
+    assertEquals(objEvent, objectEvents.get(1), "Object fixture must be second object delivered.");
+    assertEquals(compEvent, objectEvents.get(2), "Comparable fixture must be thirdobject delivered.");
 
     // Check the Catcher<Comparable<?>>...
-    assertEquals("Two Comparable<?>s should be delivered.", 2, compEvents.size());
-    assertEquals("String fixture must be first comparable delivered.", EVENT, compEvents.get(0));
-    assertEquals(
-        "Comparable fixture must be second comparable delivered.", compEvent, compEvents.get(1));
-  }
-
-  @Test
-  public void testSubscriberThrowsException() throws Exception {
+    assertEquals(2, compEvents.size(), "Two Comparable<?>s should be delivered.");
+    assertEquals(EVENT, compEvents.get(0), "String fixture must be first comparable delivered.");
+    assertEquals(compEvent, compEvents.get(1), "Comparable fixture must be second comparable delivered.");
+  }
+
+  @Test
+  void testSubscriberThrowsException() throws Exception {
     final RecordingSubscriberExceptionHandler handler = new RecordingSubscriberExceptionHandler();
     final EventBus eventBus = new EventBus(handler);
@@ -142,24 +136,18 @@
     eventBus.post(EVENT);
 
-    assertEquals("Cause should be available.", exception, handler.exception);
-    assertEquals("EventBus should be available.", eventBus, handler.context.getEventBus());
-    assertEquals("Event should be available.", EVENT, handler.context.getEvent());
-    assertEquals("Subscriber should be available.", subscriber, handler.context.getSubscriber());
-    assertEquals(
-        "Method should be available.",
-        subscriber.getClass().getMethod("throwExceptionOn", String.class),
-        handler.context.getSubscriberMethod());
-  }
-
-  @Test
-  public void testSubscriberThrowsExceptionHandlerThrowsException() throws Exception {
+    assertEquals(exception, handler.exception, "Cause should be available.");
+    assertEquals(eventBus, handler.context.getEventBus(), "EventBus should be available.");
+    assertEquals(EVENT, handler.context.getEvent(), "Event should be available.");
+    assertEquals(subscriber, handler.context.getSubscriber(), "Subscriber should be available.");
+    assertEquals(subscriber.getClass().getMethod("throwExceptionOn", String.class), handler.context.getSubscriberMethod(), "Method should be available.");
+  }
+
+  @Test
+  void testSubscriberThrowsExceptionHandlerThrowsException() throws Exception {
     final EventBus eventBus =
         new EventBus(
-            new SubscriberExceptionHandler() {
-              @Override
-              public void handleException(Throwable exception, SubscriberExceptionContext context) {
-                throw new RuntimeException("testSubscriberThrowsExceptionHandlerThrowsException_1. This is a normal exception");
-              }
-            });
+                (exception, context) -> {
+                  throw new RuntimeException("testSubscriberThrowsExceptionHandlerThrowsException_1. This is a normal exception");
+                });
     final Object subscriber =
         new Object() {
@@ -170,13 +158,9 @@
         };
     eventBus.register(subscriber);
-    try {
-      eventBus.post(EVENT);
-    } catch (RuntimeException e) {
-      fail("Exception should not be thrown.");
-    }
-  }
-
-  @Test
-  public void testDeadEventForwarding() {
+    assertDoesNotThrow(() -> eventBus.post(EVENT));
+  }
+
+  @Test
+  void testDeadEventForwarding() {
     GhostCatcher catcher = new GhostCatcher();
     bus.register(catcher);
@@ -186,10 +170,10 @@
 
     List<DeadEvent> events = catcher.getEvents();
-    assertEquals("One dead event should be delivered.", 1, events.size());
-    assertEquals("The dead event should wrap the original event.", EVENT, events.get(0).getEvent());
-  }
-
-  @Test
-  public void testDeadEventPosting() {
+    assertEquals(1, events.size(), "One dead event should be delivered.");
+    assertEquals(EVENT, events.get(0).getEvent(), "The dead event should wrap the original event.");
+  }
+
+  @Test
+  void testDeadEventPosting() {
     GhostCatcher catcher = new GhostCatcher();
     bus.register(catcher);
@@ -198,23 +182,18 @@
 
     List<DeadEvent> events = catcher.getEvents();
-    assertEquals("The explicit DeadEvent should be delivered.", 1, events.size());
-    assertEquals("The dead event must not be re-wrapped.", EVENT, events.get(0).getEvent());
-  }
-
-  @Test
-  public void testMissingSubscribe() {
+    assertEquals(1, events.size(), "The explicit DeadEvent should be delivered.");
+    assertEquals(EVENT, events.get(0).getEvent(), "The dead event must not be re-wrapped.");
+  }
+
+  @Test
+  void testMissingSubscribe() {
     bus.register(new Object());
   }
 
   @Test
-  public void testUnregister() {
+  void testUnregister() {
     StringCatcher catcher1 = new StringCatcher();
     StringCatcher catcher2 = new StringCatcher();
-    try {
-      bus.unregister(catcher1);
-      fail("Attempting to unregister an unregistered object succeeded");
-    } catch (IllegalArgumentException expected) {
-      // OK.
-    }
+    assertThrows(IllegalArgumentException.class, () -> bus.unregister(catcher1), "Attempting to unregister an unregistered object succeeded");
 
     bus.register(catcher1);
@@ -227,29 +206,20 @@
     expectedEvents.add(EVENT);
 
-    assertEquals("Two correct events should be delivered.", expectedEvents, catcher1.getEvents());
-
-    assertEquals(
-        "One correct event should be delivered.", Arrays.asList(EVENT), catcher2.getEvents());
+    assertEquals(expectedEvents, catcher1.getEvents(), "Two correct events should be delivered.");
+
+    assertEquals(Collections.singletonList(EVENT), catcher2.getEvents(), "One correct event should be delivered.");
 
     bus.unregister(catcher1);
     bus.post(EVENT);
 
-    assertEquals(
-        "Shouldn't catch any more events when unregistered.", expectedEvents, catcher1.getEvents());
-    assertEquals("Two correct events should be delivered.", expectedEvents, catcher2.getEvents());
-
-    try {
-      bus.unregister(catcher1);
-      fail("Attempting to unregister an unregistered object succeeded");
-    } catch (IllegalArgumentException expected) {
-      // OK.
-    }
+    assertEquals(expectedEvents, catcher1.getEvents(), "Shouldn't catch any more events when unregistered.");
+    assertEquals(expectedEvents, catcher2.getEvents(), "Two correct events should be delivered.");
+
+    assertThrows(IllegalArgumentException.class, () -> bus.unregister(catcher1), "Attempting to unregister an unregistered object succeeded");
 
     bus.unregister(catcher2);
     bus.post(EVENT);
-    assertEquals(
-        "Shouldn't catch any more events when unregistered.", expectedEvents, catcher1.getEvents());
-    assertEquals(
-        "Shouldn't catch any more events when unregistered.", expectedEvents, catcher2.getEvents());
+    assertEquals(expectedEvents, catcher1.getEvents(), "Shouldn't catch any more events when unregistered.");
+    assertEquals(expectedEvents, catcher2.getEvents(), "Shouldn't catch any more events when unregistered.");
   }
 
@@ -258,5 +228,5 @@
 
   @Test
-  public void testRegisterThreadSafety() throws Exception {
+  void testRegisterThreadSafety() throws Exception {
     List<StringCatcher> catchers = new CopyOnWriteArrayList<>();
     List<Future<?>> futures = new ArrayList<>();
@@ -269,17 +239,14 @@
       futures.get(i).get();
     }
-    assertEquals("Unexpected number of catchers in the list", numberOfCatchers, catchers.size());
-    bus.post(EVENT);
-    List<String> expectedEvents = Arrays.asList(EVENT);
+    assertEquals(numberOfCatchers, catchers.size(), "Unexpected number of catchers in the list");
+    bus.post(EVENT);
+    List<String> expectedEvents = Collections.singletonList(EVENT);
     for (StringCatcher catcher : catchers) {
-      assertEquals(
-          "One of the registered catchers did not receive an event.",
-          expectedEvents,
-          catcher.getEvents());
-    }
-  }
-
-  @Test
-  public void testToString() throws Exception {
+      assertEquals(expectedEvents, catcher.getEvents(), "One of the registered catchers did not receive an event.");
+    }
+  }
+
+  @Test
+  void testToString() {
     EventBus eventBus = new EventBus("a b ; - \" < > / \\ €");
     assertEquals("EventBus [a b ; - \" < > / \\ €]", eventBus.toString());
@@ -293,5 +260,5 @@
    */
   @Test
-  public void testRegistrationWithBridgeMethod() {
+  void testRegistrationWithBridgeMethod() {
     final AtomicInteger calls = new AtomicInteger();
     bus.register(
@@ -347,5 +314,5 @@
    */
   public static class GhostCatcher {
-    private List<DeadEvent> events = new ArrayList<>();
+    private final List<DeadEvent> events = new ArrayList<>();
 
     @Subscribe
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/ReentrantEventsTest.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/ReentrantEventsTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/ReentrantEventsTest.java	(revision 36064)
@@ -17,6 +17,5 @@
 package org.openstreetmap.josm.eventbus;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.ArrayList;
@@ -24,7 +23,6 @@
 import java.util.List;
 
-import org.junit.Test;
-import org.openstreetmap.josm.eventbus.EventBus;
-import org.openstreetmap.josm.eventbus.Subscribe;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -33,5 +31,5 @@
  * @author Jesse Wilson
  */
-public class ReentrantEventsTest {
+class ReentrantEventsTest {
 
   static final String FIRST = "one";
@@ -41,5 +39,5 @@
 
   @Test
-  public void testNoReentrantEvents() {
+  void testNoReentrantEvents() {
     ReentrantEventsHater hater = new ReentrantEventsHater();
     bus.register(hater);
@@ -47,8 +45,5 @@
     bus.post(FIRST);
 
-    assertEquals(
-        "ReentrantEventHater expected 2 events",
-        Arrays.asList(FIRST, SECOND),
-        hater.eventsReceived);
+    assertEquals(Arrays.asList(FIRST, SECOND), hater.eventsReceived, "ReentrantEventHater expected 2 events");
   }
 
@@ -70,5 +65,5 @@
     @Subscribe
     public void listenForDoubles(Double event) {
-      assertTrue("I received an event when I wasn't ready!", ready);
+      Assertions.assertTrue(ready, "I received an event when I wasn't ready!");
       eventsReceived.add(event);
     }
@@ -76,5 +71,5 @@
 
   @Test
-  public void testEventOrderingIsPredictable() {
+  void testEventOrderingIsPredictable() {
     EventProcessor processor = new EventProcessor();
     bus.register(processor);
@@ -85,8 +80,5 @@
     bus.post(FIRST);
 
-    assertEquals(
-        "EventRecorder expected events in order",
-        Arrays.asList(FIRST, SECOND),
-        recorder.eventsReceived);
+    assertEquals(Arrays.asList(FIRST, SECOND), recorder.eventsReceived, "EventRecorder expected events in order");
   }
 
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/StringCatcher.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/StringCatcher.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/StringCatcher.java	(revision 36064)
@@ -17,10 +17,8 @@
 package org.openstreetmap.josm.eventbus;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.ArrayList;
 import java.util.List;
-
-import org.openstreetmap.josm.eventbus.Subscribe;
 
 /**
@@ -33,5 +31,5 @@
  */
 public class StringCatcher {
-  private List<String> events = new ArrayList<>();
+  private final List<String> events = new ArrayList<>();
 
   @Subscribe
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/SubscriberRegistryTest.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/SubscriberRegistryTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/SubscriberRegistryTest.java	(revision 36064)
@@ -17,8 +17,8 @@
 package org.openstreetmap.josm.eventbus;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Arrays;
@@ -26,10 +26,8 @@
 import java.util.Iterator;
 
-import org.junit.Ignore;
-import org.junit.Test;
-import org.openstreetmap.josm.eventbus.EventBus;
-import org.openstreetmap.josm.eventbus.Subscribe;
-import org.openstreetmap.josm.eventbus.Subscriber;
-import org.openstreetmap.josm.eventbus.SubscriberRegistry;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
 
 /**
@@ -43,5 +41,5 @@
 
   @Test
-  public void testRegister() {
+  void testRegister() {
     assertEquals(0, registry.getSubscribersForTesting(String.class).size());
 
@@ -58,5 +56,5 @@
 
   @Test
-  public void testUnregister() {
+  void testUnregister() {
     StringSubscriber s1 = new StringSubscriber();
     StringSubscriber s2 = new StringSubscriber();
@@ -73,31 +71,19 @@
 
   @Test
-  public void testUnregister_notRegistered() {
-    try {
-      registry.unregister(new StringSubscriber());
-      fail();
-    } catch (IllegalArgumentException expected) {
-    }
+  void testUnregisterNotRegistered() {
+    StringSubscriber temp = new StringSubscriber();
+    assertThrows(IllegalArgumentException.class, () -> registry.unregister(temp));
 
     StringSubscriber s1 = new StringSubscriber();
     registry.register(s1);
-    try {
-      registry.unregister(new StringSubscriber());
-      fail();
-    } catch (IllegalArgumentException expected) {
-      // a StringSubscriber was registered, but not the same one we tried to unregister
-    }
+    // a StringSubscriber was registered, but not the same one we tried to unregister
+    assertThrows(IllegalArgumentException.class, () -> registry.unregister(temp));
 
     registry.unregister(s1);
-
-    try {
-      registry.unregister(s1);
-      fail();
-    } catch (IllegalArgumentException expected) {
-    }
-  }
-
-  @Test
-  public void testGetSubscribers() {
+    assertThrows(IllegalArgumentException.class, () -> registry.unregister(s1));
+  }
+
+  @Test
+  void testGetSubscribers() {
     assertEquals(0, size(registry.getSubscribers("")));
 
@@ -120,6 +106,6 @@
 
   @Test
-  @Ignore("FIXME")
-  public void testGetSubscribers_returnsImmutableSnapshot() {
+  @Disabled("FIXME")
+  void testGetSubscribersReturnsImmutableSnapshot() {
     StringSubscriber s1 = new StringSubscriber();
     StringSubscriber s2 = new StringSubscriber();
@@ -186,13 +172,11 @@
 
   @Test
-  public void testFlattenHierarchy() {
-    assertEquals(
-        new HashSet<>(Arrays.asList(
-            Object.class,
-            HierarchyFixtureInterface.class,
-            HierarchyFixtureSubinterface.class,
-            HierarchyFixtureParent.class,
-            HierarchyFixture.class)),
-        SubscriberRegistry.flattenHierarchy(HierarchyFixture.class));
+  void testFlattenHierarchy() {
+    assertEquals(new HashSet<>(Arrays.asList(
+        Object.class,
+        HierarchyFixtureInterface.class,
+        HierarchyFixtureSubinterface.class,
+        HierarchyFixtureParent.class,
+        HierarchyFixture.class)), SubscriberRegistry.flattenHierarchy(HierarchyFixture.class));
   }
 
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/SubscriberTest.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/SubscriberTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/SubscriberTest.java	(revision 36064)
@@ -18,15 +18,16 @@
 
 //import com.google.common.testing.EqualsTester;
+
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
-import org.junit.Ignore;
-import org.junit.Test;
-import org.openstreetmap.josm.eventbus.AllowConcurrentEvents;
-import org.openstreetmap.josm.eventbus.EventBus;
-import org.openstreetmap.josm.eventbus.Subscribe;
-import org.openstreetmap.josm.eventbus.Subscriber;
-
-import junit.framework.TestCase;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -36,5 +37,5 @@
  * @author Colin Decker
  */
-public class SubscriberTest extends TestCase {
+class SubscriberTest {
 
   private static final Object FIXTURE_ARGUMENT = new Object();
@@ -44,6 +45,6 @@
   private Object methodArgument;
 
-  @Override
-  protected void setUp() throws Exception {
+  @BeforeEach
+  protected void setUp() {
     bus = new EventBus();
     methodCalled = false;
@@ -52,5 +53,5 @@
 
   @Test
-  public void testCreate() {
+  void testCreate() {
     Subscriber s1 = Subscriber.create(bus, this, getTestSubscriberMethod("recordingMethod"));
     assertTrue(s1 instanceof Subscriber.SynchronizedSubscriber);
@@ -58,9 +59,9 @@
     // a thread-safe method should not create a synchronized subscriber
     Subscriber s2 = Subscriber.create(bus, this, getTestSubscriberMethod("threadSafeMethod"));
-    assertFalse(s2 instanceof Subscriber.SynchronizedSubscriber);
+    Assertions.assertFalse(s2 instanceof Subscriber.SynchronizedSubscriber);
   }
 
   @Test
-  public void testInvokeSubscriberMethod_basicMethodCall() throws Throwable {
+  void testInvokeSubscriberMethodBasicMethodCall() throws Throwable {
     Method method = getTestSubscriberMethod("recordingMethod");
     Subscriber subscriber = Subscriber.create(bus, this, method);
@@ -68,38 +69,30 @@
     subscriber.invokeSubscriberMethod(FIXTURE_ARGUMENT);
 
-    assertTrue("Subscriber must call provided method", methodCalled);
-    assertTrue(
-        "Subscriber argument must be exactly the provided object.",
-        methodArgument == FIXTURE_ARGUMENT);
+    assertTrue(methodCalled, "Subscriber must call provided method");
+    assertSame(methodArgument, FIXTURE_ARGUMENT, "Subscriber argument must be exactly the provided object.");
   }
 
   @Test
-  public void testInvokeSubscriberMethod_exceptionWrapping() throws Throwable {
+  void testInvokeSubscriberMethodExceptionWrapping() {
     Method method = getTestSubscriberMethod("exceptionThrowingMethod");
     Subscriber subscriber = Subscriber.create(bus, this, method);
 
-    try {
-      subscriber.invokeSubscriberMethod(FIXTURE_ARGUMENT);
-      fail("Subscribers whose methods throw must throw InvocationTargetException");
-    } catch (InvocationTargetException expected) {
-      assertTrue(expected.getCause() instanceof IntentionalException);
-    }
+    InvocationTargetException ite = assertThrows(InvocationTargetException.class, () -> subscriber.invokeSubscriberMethod(FIXTURE_ARGUMENT),
+            "Subscribers whose methods throw must throw InvocationTargetException");
+    assertTrue(ite.getCause() instanceof IntentionalException);
   }
 
   @Test
-  public void testInvokeSubscriberMethod_errorPassthrough() throws Throwable {
+  void testInvokeSubscriberMethodErrorPassthrough() {
     Method method = getTestSubscriberMethod("errorThrowingMethod");
     Subscriber subscriber = Subscriber.create(bus, this, method);
 
-    try {
-      subscriber.invokeSubscriberMethod(FIXTURE_ARGUMENT);
-      fail("Subscribers whose methods throw Errors must rethrow them");
-    } catch (JudgmentError expected) {
-    }
+    assertThrows(JudgmentError.class, () -> subscriber.invokeSubscriberMethod(FIXTURE_ARGUMENT),
+      "Subscribers whose methods throw Errors must rethrow them");
   }
 
   @Test
-  @Ignore("FIXME")
-  public void testEquals() throws Exception {
+  @Disabled("FIXME")
+  void testEquals() {
     /*Method charAt = String.class.getMethod("charAt", int.class);
     Method concat = String.class.getMethod("concat", String.class);
@@ -128,5 +121,5 @@
   @Subscribe
   public void recordingMethod(Object arg) {
-    assertFalse(methodCalled);
+    Assertions.assertFalse(methodCalled);
     methodCalled = true;
     methodArgument = arg;
@@ -139,5 +132,5 @@
 
   /** Local exception subclass to check variety of exception thrown. */
-  class IntentionalException extends Exception {
+  static class IntentionalException extends Exception {
 
     private static final long serialVersionUID = -2500191180248181379L;
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/outside/AnnotatedSubscriberFinderTests.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/outside/AnnotatedSubscriberFinderTests.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/outside/AnnotatedSubscriberFinderTests.java	(revision 36064)
@@ -17,12 +17,13 @@
 package org.openstreetmap.josm.eventbus.outside;
 
-import static org.junit.Assert.assertTrue;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.eventbus.EventBus;
 import org.openstreetmap.josm.eventbus.Subscribe;
@@ -48,6 +49,6 @@
     }
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeEach
+    public void setUp() {
       subscriber = createSubscriber();
       EventBus bus = new EventBus();
@@ -56,6 +57,6 @@
     }
 
-    @After
-    public void tearDown() throws Exception {
+    @AfterEach
+    public void tearDown() {
       subscriber = null;
     }
@@ -65,5 +66,5 @@
    * We break the tests up based on whether they are annotated or abstract in the superclass.
    */
-  public static class BaseSubscriberFinderTest
+  static class BaseSubscriberFinderTest
       extends AbstractEventBusTestParent<BaseSubscriberFinderTest.Subscriber> {
     static class Subscriber {
@@ -82,10 +83,10 @@
 
     @Test
-    public void testNonSubscriber() {
+    void testNonSubscriber() {
       assertTrue(getSubscriber().nonSubscriberEvents.isEmpty());
     }
 
     @Test
-    public void testSubscriber() {
+    void testSubscriber() {
       assertTrue(getSubscriber().subscriberEvents.contains(EVENT));
     }
@@ -97,5 +98,5 @@
   }
 
-  public static class AnnotatedAndAbstractInSuperclassTest
+  static class AnnotatedAndAbstractInSuperclassTest
       extends AbstractEventBusTestParent<AnnotatedAndAbstractInSuperclassTest.SubClass> {
     abstract static class SuperClass {
@@ -124,10 +125,10 @@
 
     @Test
-    public void testOverriddenAndAnnotatedInSubclass() {
+    void testOverriddenAndAnnotatedInSubclass() {
       assertTrue(getSubscriber().overriddenAndAnnotatedInSubclassEvents.contains(EVENT));
     }
 
     @Test
-    public void testOverriddenNotAnnotatedInSubclass() {
+    void testOverriddenNotAnnotatedInSubclass() {
       assertTrue(getSubscriber().overriddenInSubclassEvents.contains(EVENT));
     }
@@ -139,5 +140,5 @@
   }
 
-  public static class AnnotatedNotAbstractInSuperclassTest
+  static class AnnotatedNotAbstractInSuperclassTest
       extends AbstractEventBusTestParent<AnnotatedNotAbstractInSuperclassTest.SubClass> {
     static class SuperClass {
@@ -206,15 +207,15 @@
 
     @Test
-    public void testNotOverriddenInSubclass() {
+    void testNotOverriddenInSubclass() {
       assertTrue(getSubscriber().notOverriddenInSubclassEvents.contains(EVENT));
     }
 
     @Test
-    public void testOverriddenNotAnnotatedInSubclass() {
+    void testOverriddenNotAnnotatedInSubclass() {
       assertTrue(getSubscriber().overriddenNotAnnotatedInSubclassEvents.contains(EVENT));
     }
 
     @Test
-    public void testDifferentlyOverriddenNotAnnotatedInSubclass() {
+    void testDifferentlyOverriddenNotAnnotatedInSubclass() {
       assertTrue(getSubscriber().differentlyOverriddenNotAnnotatedInSubclassGoodEvents
           .contains(EVENT));
@@ -223,10 +224,10 @@
 
     @Test
-    public void testOverriddenAndAnnotatedInSubclass() {
+    void testOverriddenAndAnnotatedInSubclass() {
       assertTrue(getSubscriber().overriddenAndAnnotatedInSubclassEvents.contains(EVENT));
     }
 
     @Test
-    public void testDifferentlyOverriddenAndAnnotatedInSubclass() {
+    void testDifferentlyOverriddenAndAnnotatedInSubclass() {
       assertTrue(getSubscriber().differentlyOverriddenAnnotatedInSubclassGoodEvents
           .contains(EVENT));
@@ -240,5 +241,5 @@
   }
 
-  public static class AbstractNotAnnotatedInSuperclassTest
+  static class AbstractNotAnnotatedInSuperclassTest
       extends AbstractEventBusTestParent<AbstractNotAnnotatedInSuperclassTest.SubClass> {
     abstract static class SuperClass {
@@ -265,10 +266,10 @@
 
     @Test
-    public void testOverriddenAndAnnotatedInSubclass() {
+    void testOverriddenAndAnnotatedInSubclass() {
       assertTrue(getSubscriber().overriddenAndAnnotatedInSubclassEvents.contains(EVENT));
     }
 
     @Test
-    public void testOverriddenInSubclassNowhereAnnotated() {
+    void testOverriddenInSubclassNowhereAnnotated() {
       assertTrue(getSubscriber().overriddenInSubclassNowhereAnnotatedEvents.isEmpty());
     }
@@ -280,5 +281,5 @@
   }
 
-  public static class NeitherAbstractNorAnnotatedInSuperclassTest
+  static class NeitherAbstractNorAnnotatedInSuperclassTest
       extends AbstractEventBusTestParent<NeitherAbstractNorAnnotatedInSuperclassTest.SubClass> {
     static class SuperClass {
@@ -314,15 +315,15 @@
 
     @Test
-    public void testNeitherOverriddenNorAnnotated() {
+    void testNeitherOverriddenNorAnnotated() {
       assertTrue(getSubscriber().neitherOverriddenNorAnnotatedEvents.isEmpty());
     }
 
     @Test
-    public void testOverriddenInSubclassNowhereAnnotated() {
+    void testOverriddenInSubclassNowhereAnnotated() {
       assertTrue(getSubscriber().overriddenInSubclassNowhereAnnotatedEvents.isEmpty());
     }
 
     @Test
-    public void testOverriddenAndAnnotatedInSubclass() {
+    void testOverriddenAndAnnotatedInSubclass() {
       assertTrue(getSubscriber().overriddenAndAnnotatedInSubclassEvents.contains(EVENT));
     }
@@ -334,5 +335,5 @@
   }
 
-  public static class DeepInterfaceTest
+  static class DeepInterfaceTest
       extends AbstractEventBusTestParent<DeepInterfaceTest.SubscriberClass> {
     interface Interface1 {
@@ -427,40 +428,40 @@
 
     @Test
-    public void testAnnotatedIn1() {
+    void testAnnotatedIn1() {
       assertTrue(getSubscriber().annotatedIn1Events.contains(EVENT));
     }
 
     @Test
-    public void testAnnotatedIn2() {
+    void testAnnotatedIn2() {
       assertTrue(getSubscriber().annotatedIn2Events.contains(EVENT));
     }
 
     @Test
-    public void testAnnotatedIn1And2() {
+    void testAnnotatedIn1And2() {
       assertTrue(getSubscriber().annotatedIn1And2Events.contains(EVENT));
     }
 
     @Test
-    public void testAnnotatedIn1And2AndClass() {
+    void testAnnotatedIn1And2AndClass() {
       assertTrue(getSubscriber().annotatedIn1And2AndClassEvents.contains(EVENT));
     }
 
     @Test
-    public void testDeclaredIn1AnnotatedIn2() {
+    void testDeclaredIn1AnnotatedIn2() {
       assertTrue(getSubscriber().declaredIn1AnnotatedIn2Events.contains(EVENT));
     }
 
     @Test
-    public void testDeclaredIn1AnnotatedInClass() {
+    void testDeclaredIn1AnnotatedInClass() {
       assertTrue(getSubscriber().declaredIn1AnnotatedInClassEvents.contains(EVENT));
     }
 
     @Test
-    public void testDeclaredIn2AnnotatedInClass() {
+    void testDeclaredIn2AnnotatedInClass() {
       assertTrue(getSubscriber().declaredIn2AnnotatedInClassEvents.contains(EVENT));
     }
 
     @Test
-    public void testNowhereAnnotated() {
+    void testNowhereAnnotated() {
       assertTrue(getSubscriber().nowhereAnnotatedEvents.isEmpty());
     }
Index: /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/outside/OutsideEventBusTest.java
===================================================================
--- /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/outside/OutsideEventBusTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/eventbus/test/unit/org/openstreetmap/josm/eventbus/outside/OutsideEventBusTest.java	(revision 36064)
@@ -17,10 +17,10 @@
 package org.openstreetmap.josm.eventbus.outside;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.eventbus.EventBus;
 import org.openstreetmap.josm.eventbus.Subscribe;
@@ -31,5 +31,5 @@
  * @author Louis Wasserman
  */
-public class OutsideEventBusTest {
+class OutsideEventBusTest {
 
   /*
@@ -39,5 +39,5 @@
    */
   @Test
-  public void testAnonymous() {
+  void testAnonymous() {
     final AtomicReference<String> holder = new AtomicReference<>();
     final AtomicInteger deliveries = new AtomicInteger();
@@ -55,6 +55,6 @@
     bus.post(EVENT);
 
-    assertEquals("Only one event should be delivered.", 1, deliveries.get());
-    assertEquals("Correct string should be delivered.", EVENT, holder.get());
+    assertEquals(1, deliveries.get(), "Only one event should be delivered.");
+    assertEquals(EVENT, holder.get(), "Correct string should be delivered.");
   }
 }
Index: /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/FullGraphCreationTest.java
===================================================================
--- /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/FullGraphCreationTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/FullGraphCreationTest.java	(revision 36064)
@@ -2,8 +2,10 @@
 package org.openstreetmap.josm.plugins.graphview.core;
 
-import static org.junit.Assert.assertSame;
+
+import static org.junit.jupiter.api.Assertions.assertSame;
 
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -12,5 +14,5 @@
 import java.util.Map;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.plugins.graphview.core.TestDataSource.TestNode;
 import org.openstreetmap.josm.plugins.graphview.core.TestDataSource.TestRelation;
@@ -33,5 +35,5 @@
 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.VehiclePropertyStringParser.PropertyValueSyntaxException;
 
-public class FullGraphCreationTest {
+class FullGraphCreationTest {
 
     private static final AccessParameters ACCESS_PARAMS;
@@ -44,5 +46,5 @@
             ACCESS_PARAMS = new PreferenceAccessParameters(
                     "test_vehicle",
-                    Arrays.asList(AccessType.UNDEFINED),
+                    Collections.singletonList(AccessType.UNDEFINED),
                     vehiclePropertyValues);
         } catch (PropertyValueSyntaxException e) {
@@ -54,10 +56,10 @@
         @Override
         public java.util.List<String> getAccessHierarchyAncestors(String transportMode) {
-            return Arrays.asList(transportMode);
+            return Collections.singletonList(transportMode);
         }
 
         @Override
         public Collection<Tag> getBaseTags() {
-            return Arrays.asList(new Tag("highway", "test"));
+            return Collections.singletonList(new Tag("highway", "test"));
         }
 
@@ -69,5 +71,5 @@
 
     @Test
-    public void testTJunction() {
+    void testTJunction() {
 
         TestDataSource ds = new TestDataSource();
@@ -125,5 +127,5 @@
 
     @Test
-    public void testBarrier() {
+    void testBarrier() {
 
         TestDataSource ds = new TestDataSource();
Index: /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReaderTest.java	(revision 36064)
@@ -2,9 +2,9 @@
 package org.openstreetmap.josm.plugins.graphview.core.access;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
-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.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.FileInputStream;
@@ -15,5 +15,5 @@
 import java.util.Map;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.plugins.graphview.core.data.MapBasedTagGroup;
@@ -21,8 +21,8 @@
 import org.openstreetmap.josm.plugins.graphview.core.data.TagGroup;
 
-public class AccessRulesetReaderTest {
+class AccessRulesetReaderTest {
 
     @Test
-    public void testReadAccessRuleset_valid_classes() throws IOException {
+    void testReadAccessRulesetValidClasses() throws IOException {
 
         InputStream is = new FileInputStream(TestUtils.getTestDataRoot()+"accessRuleset_valid.xml");
@@ -50,5 +50,5 @@
 
     @Test
-    public void testReadAccessRuleset_valid_basetags() throws IOException {
+    void testReadAccessRulesetValidBasetags() throws IOException {
 
         InputStream is = new FileInputStream(TestUtils.getTestDataRoot()+"accessRuleset_valid.xml");
@@ -66,5 +66,5 @@
 
     @Test
-    public void testReadAccessRuleset_valid_implications() throws IOException {
+    void testReadAccessRulesetValidImplications() throws IOException {
 
         InputStream is = new FileInputStream(TestUtils.getTestDataRoot()+"accessRuleset_valid.xml");
Index: /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadInclineTest.java
===================================================================
--- /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadInclineTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadInclineTest.java	(revision 36064)
@@ -2,13 +2,13 @@
 package org.openstreetmap.josm.plugins.graphview.core.property;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.plugins.graphview.core.data.Tag;
 
-public class RoadInclineTest extends RoadPropertyTest {
+class RoadInclineTest implements RoadPropertyTest {
 
     private static void testIncline(Float expectedInclineForward, Float expectedInclineBackward,
             String inclineString) {
 
-        testEvaluateW(new RoadIncline(),
+        RoadPropertyTest.testEvaluateW(new RoadIncline(),
                 expectedInclineForward, expectedInclineBackward,
                 new Tag("incline", inclineString));
@@ -16,5 +16,5 @@
 
     @Test
-    public void testEvaluate() {
+    void testEvaluate() {
         testIncline(5f, -5f, "5 %");
         testIncline(9.5f, -9.5f, "9.5 %");
Index: /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadMaxspeedTest.java
===================================================================
--- /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadMaxspeedTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadMaxspeedTest.java	(revision 36064)
@@ -2,15 +2,15 @@
 package org.openstreetmap.josm.plugins.graphview.core.property;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.plugins.graphview.core.data.Tag;
 
-public class RoadMaxspeedTest extends RoadPropertyTest {
+class RoadMaxspeedTest implements RoadPropertyTest {
 
     private static void testMaxspeed(float expectedMaxspeed, String maxspeedString) {
-        testEvaluateBoth(new RoadMaxspeed(), expectedMaxspeed, new Tag("maxspeed", maxspeedString));
+        RoadPropertyTest.testEvaluateBoth(new RoadMaxspeed(), expectedMaxspeed, new Tag("maxspeed", maxspeedString));
     }
 
     @Test
-    public void testEvaluate_numeric() {
+    void testEvaluateNumeric() {
         testMaxspeed(30, "30");
         testMaxspeed(48.3f, "48.3");
@@ -18,5 +18,5 @@
 
     @Test
-    public void testEvaluate_kmh() {
+    void testEvaluateKmh() {
         testMaxspeed(50, "50 km/h");
         testMaxspeed(120, "120km/h");
@@ -25,5 +25,5 @@
 
     @Test
-    public void testEvaluate_mph() {
+    void testEvaluateMph() {
         testMaxspeed(72.42048f, "45 mph");
         testMaxspeed(64.373764f, "40mph");
Index: /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadPropertyTest.java
===================================================================
--- /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadPropertyTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadPropertyTest.java	(revision 36064)
@@ -2,14 +2,12 @@
 package org.openstreetmap.josm.plugins.graphview.core.property;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.Ignore;
 import org.openstreetmap.josm.plugins.graphview.core.TestDataSource;
 import org.openstreetmap.josm.plugins.graphview.core.data.Tag;
 
-@Ignore("no test")
-public abstract class RoadPropertyTest {
+public interface RoadPropertyTest {
 
-    protected static <P> void testEvaluateW(RoadPropertyType<P> property, P expectedForward, P expectedBackward, Tag... wayTags) {
+    static <P> void testEvaluateW(RoadPropertyType<P> property, P expectedForward, P expectedBackward, Tag... wayTags) {
 
         TestDataSource ds = new TestDataSource();
@@ -25,5 +23,5 @@
     }
 
-    protected static <P> void testEvaluateN(RoadPropertyType<P> property, P expected, Tag... nodeTags) {
+    static <P> void testEvaluateN(RoadPropertyType<P> property, P expected, Tag... nodeTags) {
 
         TestDataSource ds = new TestDataSource();
@@ -40,5 +38,5 @@
     }
 
-    protected static <P> void testEvaluateBoth(RoadPropertyType<P> property, P expected, Tag... nodeTags) {
+    static <P> void testEvaluateBoth(RoadPropertyType<P> property, P expected, Tag... nodeTags) {
         testEvaluateW(property, expected, expected, nodeTags);
         testEvaluateN(property, expected, nodeTags);
Index: /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/TagConditionLogicTest.java
===================================================================
--- /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/TagConditionLogicTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/TagConditionLogicTest.java	(revision 36064)
@@ -1,24 +1,26 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.graphview.core.util;
-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.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.plugins.graphview.core.data.MapBasedTagGroup;
 import org.openstreetmap.josm.plugins.graphview.core.data.Tag;
 import org.openstreetmap.josm.plugins.graphview.core.data.TagGroup;
 
-public class TagConditionLogicTest {
+class TagConditionLogicTest {
 
     TagGroup groupA;
     TagGroup groupB;
 
-    @Before
-    public void setUp() {
+    @BeforeEach
+    void setUp() {
         Map<String, String> mapA = new HashMap<>();
         mapA.put("key1", "value1");
@@ -34,5 +36,5 @@
 
     @Test
-    public void testTag() {
+    void testTag() {
         TagCondition condition = TagConditionLogic.tag(new Tag("key3", "value1"));
         assertTrue(condition.matches(groupA));
@@ -41,5 +43,5 @@
 
     @Test
-    public void testKey() {
+    void testKey() {
         TagCondition condition = TagConditionLogic.key("key3");
         assertTrue(condition.matches(groupA));
@@ -48,8 +50,8 @@
 
     @Test
-    public void testAnd() {
+    void testAnd() {
         TagCondition condition1 = TagConditionLogic.tag(new Tag("key2", "value2"));
         TagCondition conditionAnd1a = TagConditionLogic.and(condition1);
-        TagCondition conditionAnd1b = TagConditionLogic.and(Arrays.asList(condition1));
+        TagCondition conditionAnd1b = TagConditionLogic.and(Collections.singletonList(condition1));
 
         assertTrue(conditionAnd1a.matches(groupA));
@@ -78,8 +80,8 @@
 
     @Test
-    public void testOr() {
+    void testOr() {
         TagCondition condition1 = TagConditionLogic.tag(new Tag("key42", "value42"));
         TagCondition conditionOr1a = TagConditionLogic.or(condition1);
-        TagCondition conditionOr1b = TagConditionLogic.or(Arrays.asList(condition1));
+        TagCondition conditionOr1b = TagConditionLogic.or(Collections.singletonList(condition1));
 
         assertFalse(conditionOr1a.matches(groupA));
@@ -108,5 +110,5 @@
 
     @Test
-    public void testNot() {
+    void testNot() {
         TagCondition condition = TagConditionLogic.not(TagConditionLogic.key("key3"));
         assertFalse(condition.matches(groupA));
Index: /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/ValueStringParserTest.java
===================================================================
--- /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/ValueStringParserTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/ValueStringParserTest.java	(revision 36064)
@@ -2,22 +2,23 @@
 package org.openstreetmap.josm.plugins.graphview.core.util;
 
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.openstreetmap.josm.plugins.graphview.core.util.ValueStringParser.parseMeasure;
 import static org.openstreetmap.josm.plugins.graphview.core.util.ValueStringParser.parseSpeed;
 import static org.openstreetmap.josm.plugins.graphview.core.util.ValueStringParser.parseWeight;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class ValueStringParserTest {
+
+class ValueStringParserTest {
 
     /* speed */
 
     @Test
-    public void testParseSpeedDefault() {
+    void testParseSpeedDefault() {
         assertClose(50, parseSpeed("50"));
     }
 
     @Test
-    public void testParseSpeedKmh() {
+    void testParseSpeedKmh() {
         assertClose(30, parseSpeed("30 km/h"));
         assertClose(100, parseSpeed("100km/h"));
@@ -25,5 +26,5 @@
 
     @Test
-    public void testParseSpeedMph() {
+    void testParseSpeedMph() {
         assertClose(40.234f, parseSpeed("25mph"));
         assertClose(40.234f, parseSpeed("25 mph"));
@@ -31,5 +32,5 @@
 
     @Test
-    public void testParseSpeedInvalid() {
+    void testParseSpeedInvalid() {
         assertNull(parseSpeed("lightspeed"));
     }
@@ -38,10 +39,10 @@
 
     @Test
-    public void testParseMeasureDefault() {
+    void testParseMeasureDefault() {
         assertClose(3.5f, parseMeasure("3.5"));
     }
 
     @Test
-    public void testParseMeasureM() {
+    void testParseMeasureM() {
         assertClose(2, parseMeasure("2m"));
         assertClose(5.5f, parseMeasure("5.5 m"));
@@ -49,5 +50,5 @@
 
     @Test
-    public void testParseMeasureKm() {
+    void testParseMeasureKm() {
         assertClose(1000, parseMeasure("1 km"));
         assertClose(7200, parseMeasure("7.2km"));
@@ -55,10 +56,10 @@
 
     @Test
-    public void testParseMeasureMi() {
+    void testParseMeasureMi() {
         assertClose(1609.344f, parseMeasure("1 mi"));
     }
 
     @Test
-    public void testParseMeasureFeetInches() {
+    void testParseMeasureFeetInches() {
         assertClose(3.6576f, parseMeasure("12'0\""));
         assertClose(1.9812f, parseMeasure("6' 6\""));
@@ -66,5 +67,5 @@
 
     @Test
-    public void testParseMeasureInvalid() {
+    void testParseMeasureInvalid() {
         assertNull(parseMeasure("very long"));
         assertNull(parseMeasure("6' 16\""));
@@ -74,10 +75,10 @@
 
     @Test
-    public void testParseWeightDefault() {
+    void testParseWeightDefault() {
         assertClose(3.6f, parseWeight("3.6"));
     }
 
     @Test
-    public void testParseWeightT() {
+    void testParseWeightT() {
         assertClose(30, parseWeight("30t"));
         assertClose(3.5f, parseWeight("3.5 t"));
@@ -85,5 +86,5 @@
 
     @Test
-    public void testParseWeightInvalid() {
+    void testParseWeightInvalid() {
         assertNull(parseWeight("heavy"));
     }
Index: /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorSchemeTest.java
===================================================================
--- /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorSchemeTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorSchemeTest.java	(revision 36064)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.plugins.graphview.core.visualisation;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.awt.Color;
@@ -8,13 +8,13 @@
 import java.util.Map;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.plugins.graphview.core.property.RoadMaxweight;
 
-public class FloatPropertyColorSchemeTest {
+class FloatPropertyColorSchemeTest {
 
     private FloatPropertyColorScheme subject;
 
-    @Before
+    @BeforeEach
     public void setUp() {
 
@@ -28,5 +28,5 @@
 
     @Test
-    public void testGetColorForValue_below() {
+    void testGetColorForValueBelow() {
         assertEquals(new Color(42, 42, 42), subject.getColorForValue(1f));
         assertEquals(new Color(42, 42, 42), subject.getColorForValue(5f));
@@ -34,15 +34,15 @@
 
     @Test
-    public void testGetColorForValue_above() {
+    void testGetColorForValueAbove() {
         assertEquals(new Color(200, 200, 200), subject.getColorForValue(25f));
     }
 
     @Test
-    public void testGetColorForValue_value() {
+    void testGetColorForValueValue() {
         assertEquals(new Color(100, 100, 100), subject.getColorForValue(10f));
     }
 
     @Test
-    public void testGetColorForValue_interpolate() {
+    void testGetColorForValueInterpolate() {
         assertEquals(new Color(150, 150, 150), subject.getColorForValue(15f));
     }
Index: /applications/editors/josm/plugins/http2/test/unit/org/openstreetmap/josm/plugins/http2/Http2ClientTest.java
===================================================================
--- /applications/editors/josm/plugins/http2/test/unit/org/openstreetmap/josm/plugins/http2/Http2ClientTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/http2/test/unit/org/openstreetmap/josm/plugins/http2/Http2ClientTest.java	(revision 36064)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.plugins.http2;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -63,10 +64,10 @@
 
     @Test
-    void testCreateRequest_invalidURI() throws Exception {
+    void testCreateRequestInvalidURI() {
         // From https://josm.openstreetmap.de/ticket/21126
         // URISyntaxException for URL not formatted strictly according to RFC2396
         // See chapter "2.4.3. Excluded US-ASCII Characters"
-        assertTrue(assertThrows(IOException.class, () -> new Http2Client(
-                new URL("https://commons.wikimedia.org/w/api.php?format=xml&action=query&list=geosearch&gsnamespace=6&gslimit=500&gsprop=type|name&gsbbox=52.2804692|38.1772755|52.269721|38.2045051"), "GET")
+        final URL url = assertDoesNotThrow(() -> new URL("https://commons.wikimedia.org/w/api.php?format=xml&action=query&list=geosearch&gsnamespace=6&gslimit=500&gsprop=type|name&gsbbox=52.2804692|38.1772755|52.269721|38.2045051"));
+        assertTrue(assertThrows(IOException.class, () -> new Http2Client(url, "GET")
                 .createRequest()).getCause().getMessage().startsWith("Illegal character in query at index 116:"));
     }
Index: /applications/editors/josm/plugins/imagery-xml-bounds/test/unit/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ComputeBoundsActionTest.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/test/unit/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ComputeBoundsActionTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/test/unit/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ComputeBoundsActionTest.java	(revision 36064)
@@ -1,34 +1,24 @@
 package org.openstreetmap.josm.plugins.imageryxmlbounds.actions;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.Arrays;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link ComputeBoundsAction}
  */
-public class ComputeBoundsActionTest {
-
-    /**
-     * Setup rule
-     */
-    @Rule
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
+@BasicPreferences
+class ComputeBoundsActionTest {
     /**
      * Unit test of {@link ComputeBoundsAction#getBounds}
      */
     @Test
-    public void testGetBounds() {
+    void testGetBounds() {
         assertEquals("        <bounds min-lat='0' min-lon='0' max-lat='0' max-lon='0'>\n",
                 ComputeBoundsAction.getBounds(new Node(LatLon.ZERO), false));
Index: /applications/editors/josm/plugins/o5m/test/unit/org/openstreetmap/josm/plugins/o5m/io/O5mImporterTest.java
===================================================================
--- /applications/editors/josm/plugins/o5m/test/unit/org/openstreetmap/josm/plugins/o5m/io/O5mImporterTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/o5m/test/unit/org/openstreetmap/josm/plugins/o5m/io/O5mImporterTest.java	(revision 36064)
@@ -2,12 +2,12 @@
 package org.openstreetmap.josm.plugins.o5m.io;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.io.IOException;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -16,23 +16,17 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.io.IllegalDataException;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests for {@link O5mImporter}.
  */
-public class O5mImporterTest {
-
-    /**
-     * Setup test.
-     */
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class O5mImporterTest {
     private static void checkUserNull(OsmPrimitive osm, boolean hasToBeNull) {
         User usr = osm.getUser();
         if (hasToBeNull) {
-            assertNull(osm + " -> " + usr, usr);
+            assertNull(usr, osm + " -> " + usr);
         } else {
-            assertNotNull(osm + " -> " + usr, usr);
+            assertNotNull(usr, osm + " -> " + usr);
         }
     }
@@ -56,5 +50,5 @@
      */
     @Test
-    public void testParseDataSet() throws Exception {
+    void testParseDataSet() throws Exception {
         doTestMonaco(TestUtils.getTestDataRoot() + "/monaco-latest.o5m", false);
     }
@@ -66,5 +60,5 @@
      */
     @Test
-    public void testParseDataSetDropVersion() throws Exception {
+    void testParseDataSetDropVersion() throws Exception {
         doTestMonaco(TestUtils.getTestDataRoot() + "/monaco-drop-version.o5m", true);
     }
Index: /applications/editors/josm/plugins/opendata/modules/fr.toulouse/test/unit/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModuleTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/modules/fr.toulouse/test/unit/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModuleTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/modules/fr.toulouse/test/unit/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModuleTest.java	(revision 36064)
@@ -2,24 +2,18 @@
 package org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 
-import org.junit.Rule;
-import org.junit.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+
+import org.junit.jupiter.api.Test;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link ToulouseModule} class.
  */
-public class ToulouseModuleTest {
-
-    /**
-     * Setup test.
-     */
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class ToulouseModuleTest {
     @Test
-    public void testHandlersConstruction() {
+    void testHandlersConstruction() {
         ToulouseModule module = new ToulouseModule(null);
         assertFalse(module.getHandlers().isEmpty());
Index: /applications/editors/josm/plugins/opendata/modules/fr.toulouse/test/unit/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModuleTestIT.java
===================================================================
--- /applications/editors/josm/plugins/opendata/modules/fr.toulouse/test/unit/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModuleTestIT.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/modules/fr.toulouse/test/unit/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModuleTestIT.java	(revision 36064)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse;
 
-import static org.junit.Assert.assertTrue;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
@@ -8,8 +9,8 @@
 import java.util.TreeMap;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.HttpClient;
 
@@ -17,14 +18,9 @@
  * Integration tests of {@link ToulouseModule} class.
  */
-public class ToulouseModuleTestIT {
-
-    /**
-     * Setup test.
-     */
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences().timeout(30_000);
-
+@BasicPreferences
+@Timeout(30)
+class ToulouseModuleTestIT {
     @Test
-    public void testUrlValidity() throws IOException {
+    void testUrlValidity() throws IOException {
         Map<String, Integer> errors = new TreeMap<>();
         for (AbstractDataSetHandler handler : new ToulouseModule(null).getNewlyInstanciatedHandlers()) {
@@ -34,5 +30,5 @@
             }
         }
-        assertTrue(errors.toString(), errors.isEmpty());
+        assertTrue(errors.isEmpty(), errors.toString());
     }
 }
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReaderTest.java	(revision 36064)
@@ -3,15 +3,16 @@
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.InputStream;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 import org.openstreetmap.josm.tools.Logging;
 
@@ -20,12 +21,7 @@
  */
 @BasicPreferences
+@Projection
+@Timeout(value = 10, unit = TimeUnit.MINUTES)
 class ZipReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    public JOSMTestRules rules = new JOSMTestRules().projection().noTimeout();
-
     /**
      * Test for various zip files reading
@@ -37,5 +33,5 @@
             File zipfile = p.toFile();
             Logging.info("Testing reading file "+zipfile.getPath());
-            try (InputStream is = new FileInputStream(zipfile)) {
+            try (InputStream is = Files.newInputStream(zipfile.toPath())) {
                 for (Entry<File, DataSet> entry : ZipReader.parseDataSets(is, null, null, false).entrySet()) {
                     String name = entry.getKey().getName();
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/datasets/DataSetUpdaterTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/datasets/DataSetUpdaterTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/datasets/DataSetUpdaterTest.java	(revision 36064)
@@ -2,10 +2,15 @@
 package org.openstreetmap.josm.plugins.opendata.core.io.datasets;
 
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.util.concurrent.TimeUnit;
 import java.util.function.Predicate;
 
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
@@ -17,7 +22,5 @@
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
-
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -25,4 +28,6 @@
  */
 @BasicPreferences
+@Projection
+@Timeout(value = 1, unit = TimeUnit.MINUTES)
 class DataSetUpdaterTest {
 
@@ -31,5 +36,5 @@
      */
     @RegisterExtension
-    JOSMTestRules rules = new JOSMTestRules().projection().devAPI().timeout(60000);
+    JOSMTestRules rules = new JOSMTestRules().devAPI();
 
     /**
@@ -40,5 +45,5 @@
     void testTicket11166() throws Exception {
         File file = new File(TestUtils.getRegressionDataFile(11166, "raba760dissJosm.zip"));
-        try (InputStream is = new FileInputStream(file)) {
+        try (InputStream is = Files.newInputStream(file.toPath())) {
             Predicate<? super Way> p = w -> w.getNodesCount() >= 0.9 * OsmApi.getOsmApi().getCapabilities().getMaxWayNodes();
             DataSet ds = ZipReader.parseDataSet(is, null, null, false);
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlReaderTest.java	(revision 36064)
@@ -6,13 +6,14 @@
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.util.concurrent.TimeUnit;
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -20,12 +21,7 @@
  */
 @BasicPreferences
+@Projection
+@Timeout(value = 1, unit = TimeUnit.MINUTES)
 class GmlReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    JOSMTestRules rules = new JOSMTestRules().projection().timeout(60000);
-
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/11624">#11624</a>
@@ -35,5 +31,5 @@
     void testTicket11624() throws Exception {
         File file = new File(TestUtils.getRegressionDataFile(11624, "temp3.gml"));
-        try (InputStream is = new FileInputStream(file)) {
+        try (InputStream is = Files.newInputStream(file.toPath())) {
             for (Node n : GmlReader.parseDataSet(is, null, null).getNodes()) {
                 assertNotNull(n.getCoor(), n.toString());
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReaderTest.java	(revision 36064)
@@ -8,9 +8,8 @@
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -18,12 +17,6 @@
  */
 @BasicPreferences
+@Projection
 class KmlReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    JOSMTestRules rules = new JOSMTestRules().projection();
-
     /**
      * Unit test of {@link KmlReader#COLOR_PATTERN}
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReaderTest.java	(revision 36064)
@@ -8,5 +8,4 @@
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -14,6 +13,6 @@
 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -21,12 +20,6 @@
  */
 @BasicPreferences
+@Projection
 class MifReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    JOSMTestRules rules = new JOSMTestRules().projection();
-
     private static AbstractDataSetHandler newHandler(final String epsgCode) {
         AbstractDataSetHandler handler = new AbstractDataSetHandler() {
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReaderTest.java	(revision 36064)
@@ -1,21 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.Collection;
-import java.util.Objects;
-
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -25,16 +8,30 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.util.Collection;
+import java.util.Objects;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Projection;
+
 /**
  * Unit tests of {@link ShpReader} class.
  */
 @BasicPreferences
+@Projection
+@Timeout(value = 1, unit = TimeUnit.MINUTES)
 class ShpReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    JOSMTestRules rules = new JOSMTestRules().projection().timeout(60000);
-
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/12714">#12714</a>
@@ -44,5 +41,5 @@
     void testTicket12714() throws Exception {
         File file = new File(TestUtils.getRegressionDataFile(12714, "linhas.shp"));
-        try (InputStream is = new FileInputStream(file)) {
+        try (InputStream is = Files.newInputStream(file.toPath())) {
             for (Node n : ShpReader.parseDataSet(is, file, null, null).getNodes()) {
                 assertNotNull(n.getCoor(), n.toString());
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/TabReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/TabReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/TabReaderTest.java	(revision 36064)
@@ -3,13 +3,14 @@
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.util.concurrent.TimeUnit;
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -17,12 +18,7 @@
  */
 @BasicPreferences
+@Projection
+@Timeout(value = 1, unit = TimeUnit.MINUTES)
 class TabReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    JOSMTestRules rules = new JOSMTestRules().projection().timeout(60000);
-
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/15159">#15159</a>
@@ -32,5 +28,5 @@
     void testTicket15159() throws Exception {
         File file = new File(TestUtils.getRegressionDataFile(15159, "Sanisette.tab"));
-        try (InputStream is = new FileInputStream(file)) {
+        try (InputStream is = Files.newInputStream(file.toPath())) {
             NonRegFunctionalTests.testGeneric("#15159", TabReader.parseDataSet(is, file, null, null));
         }
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/CsvReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/CsvReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/CsvReaderTest.java	(revision 36064)
@@ -5,5 +5,4 @@
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.EastNorth;
@@ -13,6 +12,6 @@
 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -20,12 +19,6 @@
  */
 @BasicPreferences
+@Projection
 class CsvReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    JOSMTestRules rules = new JOSMTestRules().projection();
-
     private static AbstractDataSetHandler newHandler(final String epsgCode) {
         AbstractDataSetHandler handler = new AbstractDataSetHandler() {
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/OdsReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/OdsReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/OdsReaderTest.java	(revision 36064)
@@ -5,9 +5,8 @@
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -15,11 +14,6 @@
  */
 @BasicPreferences
+@Projection
 class OdsReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    JOSMTestRules rules = new JOSMTestRules().projection();
 
     /**
Index: /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/XlsReaderTest.java
===================================================================
--- /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/XlsReaderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/XlsReaderTest.java	(revision 36064)
@@ -1,9 +1,11 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.opendata.core.io.tabular;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.io.InputStream;
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.EastNorth;
@@ -14,9 +16,6 @@
 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
+import org.openstreetmap.josm.testutils.annotations.Projection;
 
 /**
@@ -24,12 +23,6 @@
  */
 @BasicPreferences
+@Projection
 class XlsReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    public JOSMTestRules rules = new JOSMTestRules().projection();
-
     private static AbstractDataSetHandler newHandler(final String epsgCode) {
         AbstractDataSetHandler handler = new AbstractDataSetHandler() {
Index: /applications/editors/josm/plugins/pbf/test/unit/org/openstreetmap/josm/plugins/pbf/io/PbfExporterTest.java
===================================================================
--- /applications/editors/josm/plugins/pbf/test/unit/org/openstreetmap/josm/plugins/pbf/io/PbfExporterTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/pbf/test/unit/org/openstreetmap/josm/plugins/pbf/io/PbfExporterTest.java	(revision 36064)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.pbf.io;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 
 import java.io.FileInputStream;
@@ -6,7 +8,8 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -14,17 +17,12 @@
 import org.openstreetmap.josm.io.Compression;
 import org.openstreetmap.josm.io.OsmReader;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests for {@link PbfExporter}.
  */
-public class PbfExporterTest {
-
-    /**
-     * Setup test.
-     */
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences().timeout(20000);
-
+@BasicPreferences
+@Timeout(20)
+class PbfExporterTest {
     /**
      * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/11169">Ticket #11169</a>.
@@ -32,10 +30,11 @@
      */
     @Test
-    public void testTicket11169() throws Exception {
+    void testTicket11169() throws Exception {
         try (InputStream is = Compression.ZIP.getUncompressedInputStream(
-                new FileInputStream(TestUtils.getRegressionDataFile(11169, "Portsmouth_Area.osm.zip")))) {
+                Files.newInputStream(Paths.get(TestUtils.getRegressionDataFile(11169, "Portsmouth_Area.osm.zip"))))) {
             DataSet ds = OsmReader.parseDataSet(is, null);
             Path out = Files.createTempFile("pbf-bug-11169", "pbf");
-            new PbfExporter().doSave(out.toFile(), new OsmDataLayer(ds, null, null));
+            PbfExporter exporter = new PbfExporter();
+            assertDoesNotThrow(() -> exporter.doSave(out.toFile(), new OsmDataLayer(ds, null, null)));
             Files.delete(out);
         }
Index: /applications/editors/josm/plugins/pbf/test/unit/org/openstreetmap/josm/plugins/pbf/io/PbfImporterTest.java
===================================================================
--- /applications/editors/josm/plugins/pbf/test/unit/org/openstreetmap/josm/plugins/pbf/io/PbfImporterTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/pbf/test/unit/org/openstreetmap/josm/plugins/pbf/io/PbfImporterTest.java	(revision 36064)
@@ -2,12 +2,11 @@
 package org.openstreetmap.josm.plugins.pbf.io;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.io.IOException;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -16,23 +15,17 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.io.IllegalDataException;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests for {@link PbfImporter}.
  */
-public class PbfImporterTest {
-
-    /**
-     * Setup test.
-     */
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class PbfImporterTest {
     private static void checkUserNull(OsmPrimitive osm, boolean hasToBeNull) {
         User usr = osm.getUser();
         if (hasToBeNull) {
-            assertNull(osm + " -> " + usr, usr);
+            assertNull(usr, osm + " -> " + usr);
         } else {
-            assertNotNull(osm + " -> " + usr, usr);
+            assertNotNull(usr, osm + " -> " + usr);
         }
     }
@@ -55,5 +48,5 @@
      */
     @Test
-    public void testParseDataSet() throws Exception {
+    void testParseDataSet() throws Exception {
         doTestMonaco(TestUtils.getTestDataRoot() + "/monaco-latest.osm.pbf", false);
     }
@@ -64,5 +57,5 @@
      */
     @Test
-    public void testTicket10132() throws Exception {
+    void testTicket10132() throws Exception {
         doTestMonaco(TestUtils.getRegressionDataFile(10132, "Monaco-SP.osm.pbf"), true);
     }
@@ -73,5 +66,5 @@
      */
     @Test
-    public void testTicket12567() throws Exception {
+    void testTicket12567() throws Exception {
         DataSet ds = new PbfImporter().parseDataSet(TestUtils.getRegressionDataFile(12567, "12390008.osm.pbf"));
         assertNotNull(ds);
@@ -86,5 +79,5 @@
      */
     @Test
-    public void testTicket14545() throws Exception {
+    void testTicket14545() throws Exception {
         DataSet ds = new PbfImporter().parseDataSet(TestUtils.getRegressionDataFile(14545, "reg14545.osm.pbf"));
         assertNotNull(ds);
Index: /applications/editors/josm/plugins/pdfimport/test/unit/org/openstreetmap/josm/plugins/pdfimport/pdfbox/PDFParserTest.java
===================================================================
--- /applications/editors/josm/plugins/pdfimport/test/unit/org/openstreetmap/josm/plugins/pdfimport/pdfbox/PDFParserTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/pdfimport/test/unit/org/openstreetmap/josm/plugins/pdfimport/pdfbox/PDFParserTest.java	(revision 36064)
@@ -2,15 +2,16 @@
 package org.openstreetmap.josm.plugins.pdfimport.pdfbox;
 
-import static org.junit.Assert.assertEquals;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.awt.Rectangle;
 import java.io.File;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.plugins.pdfimport.PathOptimizer;
 
-public class PDFParserTest {
+class PDFParserTest {
 
     private PathOptimizer parse(String fileName) throws Exception {
@@ -22,5 +23,5 @@
 
     @Test
-    public void testParse9053() throws Exception {
+    void testParse9053() throws Exception {
         PathOptimizer data = parse(TestUtils.getRegressionDataFile(9053, "testpdf.pdf"));
         assertEquals(0, data.bounds.getMinX(), 0);
@@ -33,5 +34,5 @@
 
     @Test
-    public void testParse12176() throws Exception {
+    void testParse12176() throws Exception {
         PathOptimizer data = parse(TestUtils.getRegressionDataFile(12176, "LYD_Etage_0.pdf"));
         assertEquals(new Rectangle(595, 842), data.bounds);
Index: /applications/editors/josm/plugins/poly/test/unit/poly/PolyExporterTest.java
===================================================================
--- /applications/editors/josm/plugins/poly/test/unit/poly/PolyExporterTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/poly/test/unit/poly/PolyExporterTest.java	(revision 36064)
@@ -2,16 +2,16 @@
 package poly;
 
-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.nio.file.Files;
 import java.nio.file.Path;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
@@ -19,12 +19,7 @@
  * @author Gerd Petermann
  */
-public class PolyExporterTest {
-
-    /**
-     * Setup test.
-     */
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences().timeout(20000);
-
+@BasicPreferences
+@Timeout(20)
+class PolyExporterTest {
     /**
      * Import file, export it, import the exported file and compare content
@@ -32,5 +27,5 @@
      */
     @Test
-    public void testSimpleExport() throws Exception {
+    void testSimpleExport() throws Exception {
         DataSet dsIn1 = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/simple.poly");
         assertNotNull(dsIn1);
@@ -55,5 +50,5 @@
      */
     @Test
-    public void testExport() throws Exception {
+    void testExport() throws Exception {
         DataSet dsIn1 = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/holes.poly");
         assertNotNull(dsIn1);
Index: /applications/editors/josm/plugins/poly/test/unit/poly/PolyImporterTest.java
===================================================================
--- /applications/editors/josm/plugins/poly/test/unit/poly/PolyImporterTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/poly/test/unit/poly/PolyImporterTest.java	(revision 36064)
@@ -2,14 +2,13 @@
 package poly;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.io.IllegalDataException;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
@@ -17,17 +16,11 @@
  * @author Gerd Petermann
  */
-public class PolyImporterTest {
-
-    /**
-     * Setup test.
-     */
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class PolyImporterTest {
     /**
      * @throws Exception if an error occurs
      */
     @Test
-    public void testSimple() throws Exception {
+    void testSimple() throws Exception {
         DataSet ds = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/simple.poly");
         assertNotNull(ds);
@@ -42,5 +35,5 @@
      */
     @Test
-    public void testSimple2() throws Exception {
+    void testSimple2() throws Exception {
         DataSet ds = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/splitter.poly");
         assertNotNull(ds);
@@ -54,5 +47,5 @@
      */
     @Test
-    public void testHoles() throws Exception {
+    void testHoles() throws Exception {
         DataSet ds = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/holes.poly");
         assertNotNull(ds);
@@ -66,5 +59,5 @@
      */
     @Test
-    public void testTwoOuter() throws Exception {
+    void testTwoOuter() throws Exception {
         DataSet ds = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/australia_v.poly");
         assertNotNull(ds);
@@ -78,5 +71,5 @@
      */
     @Test
-    public void testDoubleEnd() throws Exception {
+    void testDoubleEnd() throws Exception {
         DataSet ds = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/bremen-double-end.poly");
         assertNotNull(ds);
@@ -90,5 +83,5 @@
      */
     @Test
-    public void testMultipleFile() throws Exception {
+    void testMultipleFile() throws Exception {
         DataSet ds = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/multi-concat.poly");
         assertNotNull(ds);
@@ -100,10 +93,9 @@
     /**
      * Should throw an IllegalDataException
-     * @throws Exception if an error occurs
      */
-    @Test (expected = IllegalDataException.class)
-    public void testNameMissing() throws Exception {
-        DataSet ds = new PolyImporter().parseDataSet(TestUtils.getTestDataRoot() + "/name-missing.poly");
-        assertNull(ds);
+    @Test
+    void testNameMissing() {
+        final PolyImporter importer = new PolyImporter();
+        assertThrows(IllegalDataException.class, () -> importer.parseDataSet(TestUtils.getTestDataRoot() + "/name-missing.poly"));
     }
 
Index: /applications/editors/josm/plugins/print/test/unit/org/openstreetmap/josm/plugins/print/PrintDialogTest.java
===================================================================
--- /applications/editors/josm/plugins/print/test/unit/org/openstreetmap/josm/plugins/print/PrintDialogTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/print/test/unit/org/openstreetmap/josm/plugins/print/PrintDialogTest.java	(revision 36064)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.plugins.print;
 
-import static org.junit.Assert.assertEquals;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.Arrays;
@@ -8,20 +9,13 @@
 import javax.print.attribute.standard.OrientationRequested;
 
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit test of {@link PrintDialog} class.
  */
-public class PrintDialogTest {
-
-    /**
-     * Setup test.
-     */
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class PrintDialogTest {
     /**
      * Unit test of {@link PrintDialog#unmarshallPrintSetting}
@@ -29,5 +23,5 @@
      */
     @Test
-    public void testUnmarshallPrintSetting() throws ReflectiveOperationException {
+    void testUnmarshallPrintSetting() throws ReflectiveOperationException {
         assertEquals(OrientationRequested.PORTRAIT, PrintDialog.unmarshallPrintSetting(Arrays.asList(
                 "javax.print.attribute.standard.OrientationRequested",
@@ -42,6 +36,6 @@
      */
     @Test
-    @Ignore("not fixed yet")
-    public void testTicket13302() throws ReflectiveOperationException {
+    @Disabled("not fixed yet")
+    void testTicket13302() throws ReflectiveOperationException {
         assertEquals(OrientationRequested.PORTRAIT, PrintDialog.unmarshallPrintSetting(Arrays.asList(
                 "javax.print.attribute.standard.MediaSizeName",
Index: /applications/editors/josm/plugins/surveyor/test/unit/org/openstreetmap/josm/plugins/surveyor/SurveyorShowActionTest.java
===================================================================
--- /applications/editors/josm/plugins/surveyor/test/unit/org/openstreetmap/josm/plugins/surveyor/SurveyorShowActionTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/surveyor/test/unit/org/openstreetmap/josm/plugins/surveyor/SurveyorShowActionTest.java	(revision 36064)
@@ -2,35 +2,26 @@
 package org.openstreetmap.josm.plugins.surveyor;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.List;
 
-import org.junit.Rule;
-import org.junit.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.junit.jupiter.api.Test;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Logging;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link #SurveyorShowAction}
  */
-public class SurveyorShowActionTest {
-
-    /**
-     * Setup rule
-     */
-    @Rule
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class SurveyorShowActionTest {
     @Test
-    public void testCreateComponent() {
+    void testCreateComponent() {
         Logging.clearLastErrorAndWarnings();
         SurveyorComponent comp = SurveyorShowAction.createComponent();
         assertNotNull(comp);
         List<String> errors = Logging.getLastErrorAndWarnings();
-        assertTrue(errors.toString(), errors.isEmpty());
+        assertTrue(errors.isEmpty(), errors.toString());
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/AllUnitTests.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/AllUnitTests.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/AllUnitTests.java	(revision 36064)
@@ -2,10 +2,10 @@
 package org.openstreetmap.josm.plugins.turnrestrictions;
 
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
+import org.junit.platform.suite.api.SelectClasses;
+import org.junit.platform.suite.api.Suite;
 import org.openstreetmap.josm.plugins.turnrestrictions.editor.AllEditorTests;
 
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
+@Suite
+@SelectClasses({
     AllEditorTests.class,
     TurnRestrictionBuilderTest.class
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilderTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilderTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilderTest.java	(revision 36064)
@@ -2,9 +2,9 @@
 package org.openstreetmap.josm.plugins.turnrestrictions;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-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.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.intersectionAngle;
 import static org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.selectToWayAfterSplit;
@@ -12,9 +12,9 @@
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Optional;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Node;
@@ -25,22 +25,17 @@
 import org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.RelativeWayJoinOrientation;
 import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionType;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-public class TurnRestrictionBuilderTest {
-
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
-
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+@BasicPreferences
+class TurnRestrictionBuilderTest {
     TurnRestrictionBuilder builder = new TurnRestrictionBuilder();
 
     boolean hasExactlyOneMemberWithRole(Relation r, final String role) {
-        return r.getMembers().stream().filter(rm -> role.equals(rm.getRole())).findFirst().isPresent();
+        return r.getMembers().stream().anyMatch(rm -> role.equals(rm.getRole()));
     }
 
     OsmPrimitive memberWithRole(Relation r, final String role) {
         Optional<RelationMember> opt = r.getMembers().stream().filter(rm -> role.equals(rm.getRole())).findFirst();
-        if (!opt.isPresent())
-            return null;
-        return opt.get().getMember();
+        return opt.map(RelationMember::getMember).orElse(null);
     }
 
@@ -57,5 +52,5 @@
      */
     @Test
-    public void noUTurn_1() {
+    void testNoUTurn1() {
         Way w = new Way(1);
         Node n1 = new Node(1);
@@ -84,5 +79,5 @@
     */
    @Test
-   public void noUTurn_2() {
+   void testNoUTurn2() {
        Way w = new Way(1);
        Node n1 = new Node(1);
@@ -106,10 +101,10 @@
 
    @Test
-   public void nullSelection() {
+   void testNullSelection() {
        assertEmptyTurnRestriction(builder.build(null));
    }
 
    @Test
-   public void emptySelection() {
+   void testEmptySelection() {
        assertEmptyTurnRestriction(builder.build(new ArrayList<>()));
    }
@@ -120,7 +115,7 @@
     */
    @Test
-   public void oneSelectedWay() {
+   void testOneSelectedWay() {
        Way w = new Way(1);
-       Relation tr = builder.build(Arrays.asList(w));
+       Relation tr = builder.build(Collections.singletonList(w));
        assertNotNull(tr);
        assertEquals("restriction", tr.get("type"));
@@ -134,5 +129,5 @@
     */
    @Test
-   public void twoUnconnectedWays() {
+   void testTwoUnconnectedWays() {
        Way w1 = new Way(1);
        w1.setNodes(Arrays.asList(new Node(11), new Node(12)));
@@ -159,5 +154,5 @@
     */
    @Test
-   public void twoConnectedWays_1() {
+   void testTwoConnectedWays1() {
        Node n1 = new Node(1);
        n1.setCoor(new LatLon(1, 1));
@@ -217,5 +212,5 @@
     */
    @Test
-   public void twoConnectedWays_2() {
+   void testTwoConnectedWays2() {
        Node n1 = new Node(1);
        n1.setCoor(new LatLon(5, 5));
@@ -260,95 +255,93 @@
 
    /**
-   * Two connected ways. end node of the first way connects to end node of
-   * the second way. left turn.
-   *
-   *
-   *           (7,5) -
-   *             ^     -    w2
-   *             | w1     ------> (6,7)
-   *             |
-   *           (5,5)
-   */
-  @Test
-  public void twoConnectedWays_3() {
-      Node n1 = new Node(1);
-      n1.setCoor(new LatLon(5, 5));
-      Node n2 = new Node(2);
-      n2.setCoor(new LatLon(7, 5));
-      Node n3 = new Node(3);
-      n3.setCoor(new LatLon(6, 7));
-
-      Way w1 = new Way(1);
-      w1.setNodes(Arrays.asList(n1, n2));
-      Way w2 = new Way(2);
-      w2.setNodes(Arrays.asList(n2, n3));
-
-      Relation tr = builder.build(Arrays.asList(w1, w2, n2));
-
-      assertNotNull(tr);
-      assertEquals("restriction", tr.get("type"));
-      assertEquals(3, tr.getMembersCount());
-      assertEquals(w1, memberWithRole(tr, "from"));
-      assertEquals(w2, memberWithRole(tr, "to"));
-      assertEquals(n2, memberWithRole(tr, "via"));
-
-      assertEquals("no_right_turn", tr.get("restriction"));
-  }
-
-  /**
-  * Two connected ways. end node of the first way connects to end node of
-  * the second way. left turn.
-  *
-  *
-  *           (10,10)
-  *                 \
-  *                  \
-  *                   \
-  *                    v
-  *                     (8,15)
-  *                    /
-  *                   /
-  *                  /
-  *                 v
-  *            (5,11)
-  */
- @Test
- public void twoConnectedWays_4() {
-     Node n1 = new Node(1);
-     n1.setCoor(new LatLon(10, 10));
-     Node n2 = new Node(2);
-     n2.setCoor(new LatLon(8, 15));
-     Node n3 = new Node(3);
-     n3.setCoor(new LatLon(5, 11));
-
-     Way w1 = new Way(1);
-     w1.setNodes(Arrays.asList(n1, n2));
-     Way w2 = new Way(2);
-     w2.setNodes(Arrays.asList(n2, n3));
-
-     Relation tr = builder.build(Arrays.asList(w1, w2, n2));
-
-     assertNotNull(tr);
-     assertEquals("restriction", tr.get("type"));
-     assertEquals(3, tr.getMembersCount());
-     assertEquals(w1, memberWithRole(tr, "from"));
-     assertEquals(w2, memberWithRole(tr, "to"));
-     assertEquals(n2, memberWithRole(tr, "via"));
-
-     assertEquals("no_right_turn", tr.get("restriction"));
-
-     /*
-      * opposite order, from w2 to w1. In  this case we have left turn.
-      */
-     tr = builder.build(Arrays.asList(w2, w1, n2));
-
-     assertNotNull(tr);
-     assertEquals("restriction", tr.get("type"));
-     assertEquals(3, tr.getMembersCount());
-     assertEquals(w2, memberWithRole(tr, "from"));
-     assertEquals(w1, memberWithRole(tr, "to"));
-     assertEquals(n2, memberWithRole(tr, "via"));
-
-     assertEquals("no_left_turn", tr.get("restriction"));
+    * Two connected ways. end node of the first way connects to end node of
+    * the second way. left turn.
+    *
+    *           (7,5) -
+    *             ^     -    w2
+    *             | w1     ------> (6,7)
+    *             |
+    *           (5,5)
+    */
+    @Test
+    void testTwoConnectedWays3() {
+        Node n1 = new Node(1);
+        n1.setCoor(new LatLon(5, 5));
+        Node n2 = new Node(2);
+        n2.setCoor(new LatLon(7, 5));
+        Node n3 = new Node(3);
+        n3.setCoor(new LatLon(6, 7));
+
+        Way w1 = new Way(1);
+        w1.setNodes(Arrays.asList(n1, n2));
+        Way w2 = new Way(2);
+        w2.setNodes(Arrays.asList(n2, n3));
+
+        Relation tr = builder.build(Arrays.asList(w1, w2, n2));
+
+        assertNotNull(tr);
+        assertEquals("restriction", tr.get("type"));
+        assertEquals(3, tr.getMembersCount());
+        assertEquals(w1, memberWithRole(tr, "from"));
+        assertEquals(w2, memberWithRole(tr, "to"));
+        assertEquals(n2, memberWithRole(tr, "via"));
+
+        assertEquals("no_right_turn", tr.get("restriction"));
+    }
+
+    /**
+     * Two connected ways. end node of the first way connects to end node of
+     * the second way. left turn.
+     *
+     *           (10,10)
+     *                 \
+     *                  \
+     *                   \
+     *                    v
+     *                     (8,15)
+     *                    /
+     *                   /
+     *                  /
+     *                 v
+     *            (5,11)
+     */
+    @Test
+    void testTwoConnectedWays4() {
+        Node n1 = new Node(1);
+        n1.setCoor(new LatLon(10, 10));
+        Node n2 = new Node(2);
+        n2.setCoor(new LatLon(8, 15));
+        Node n3 = new Node(3);
+        n3.setCoor(new LatLon(5, 11));
+
+        Way w1 = new Way(1);
+        w1.setNodes(Arrays.asList(n1, n2));
+        Way w2 = new Way(2);
+        w2.setNodes(Arrays.asList(n2, n3));
+
+        Relation tr = builder.build(Arrays.asList(w1, w2, n2));
+
+        assertNotNull(tr);
+        assertEquals("restriction", tr.get("type"));
+        assertEquals(3, tr.getMembersCount());
+        assertEquals(w1, memberWithRole(tr, "from"));
+        assertEquals(w2, memberWithRole(tr, "to"));
+        assertEquals(n2, memberWithRole(tr, "via"));
+
+        assertEquals("no_right_turn", tr.get("restriction"));
+
+        /*
+         * opposite order, from w2 to w1. In  this case we have left turn.
+         */
+        tr = builder.build(Arrays.asList(w2, w1, n2));
+
+        assertNotNull(tr);
+        assertEquals("restriction", tr.get("type"));
+        assertEquals(3, tr.getMembersCount());
+        assertEquals(w2, memberWithRole(tr, "from"));
+        assertEquals(w1, memberWithRole(tr, "to"));
+        assertEquals(n2, memberWithRole(tr, "via"));
+
+        assertEquals("no_left_turn", tr.get("restriction"));
     }
 
@@ -374,5 +367,5 @@
       */
      @Test
-     public void intersectionAngle_1() {
+     void testIntersectionAngle1() {
          Node n1 = nn(1, 5, 5);
          Node n2 = nn(2, 5, 10);
@@ -429,5 +422,5 @@
      */
     @Test
-    public void intersectionAngle_2() {
+    void testIntersectionAngle2() {
         Node n1 = nn(1, 5, 5);
         Node n2 = nn(2, 5, 10);
@@ -473,99 +466,98 @@
      *          /
      *      (-5, -10) n2
-    *           ^
-    *           |
-    *           | from
-    *           |
-    *       (-10,-10) n1
-    */
-   @Test
-   public void intersectionAngle_3() {
-       Node n1 = nn(1, -10, -10);
-       Node n2 = nn(2, -5, -10);
-       Node n3 = nn(3, -1, -6);
-       Way from = nw(1, n1, n2);
-       Way to = nw(2, n2, n3);
-
-       double a = TurnRestrictionBuilder.intersectionAngle(from, to);
-       assertEquals(45, Math.toDegrees(a), 1e-7);
-
-       /*
-        * if reversed from, the intersection angle is still 45
-        */
-       from = nw(1, n2, n1);
-       to = nw(2, n2, n3);
-       a = TurnRestrictionBuilder.intersectionAngle(from, to);
-       assertEquals(45, Math.toDegrees(a), 1e-7);
-
-       /*
-       * if reversed to, the intersection angle is still 45
-       */
-       from = nw(1, n1, n2);
-       to = nw(2, n3, n2);
-       a = TurnRestrictionBuilder.intersectionAngle(from, to);
-       assertEquals(45, Math.toDegrees(a), 1e-7);
-
-       /*
-       * if reversed both, the intersection angle is still 45
-       */
-       from = nw(1, n2, n1);
-       to = nw(2, n3, n2);
-       a = TurnRestrictionBuilder.intersectionAngle(from, to);
-       assertEquals(45, Math.toDegrees(a), 1e-7);
-   }
-
-   /**
-   *
-   *
-   *         (-1,-14) (n3)
-   *            ^
-   *            \
-   *             \ to
-   *              \
-   *          (-5, -10) n2
-  *               ^
-  *               |
-  *               | from
-  *               |
-  *           (-10,-10) n1
-  */
- @Test
- public void intersectionAngle_4() {
-     Node n1 = nn(1, -10, -10);
-     Node n2 = nn(2, -5, -10);
-     Node n3 = nn(3, -1, -14);
-     Way from = nw(1, n1, n2);
-     Way to = nw(2, n2, n3);
-
-     double a = TurnRestrictionBuilder.intersectionAngle(from, to);
-     assertEquals(-45, Math.toDegrees(a), 1e-7);
-
-     /*
-      * if reversed from, the intersection angle is still -45
-      */
-     from = nw(1, n2, n1);
-     to = nw(2, n2, n3);
-     a = TurnRestrictionBuilder.intersectionAngle(from, to);
-     assertEquals(-45, Math.toDegrees(a), 1e-7);
-
-     /*
-     * if reversed to, the intersection angle is still -45
+     *           ^
+     *           |
+     *           | from
+     *           |
+     *       (-10,-10) n1
      */
-     from = nw(1, n1, n2);
-     to = nw(2, n3, n2);
-     a = TurnRestrictionBuilder.intersectionAngle(from, to);
-     assertEquals(-45, Math.toDegrees(a), 1e-7);
-
-     /*
-     * if reversed both, the intersection angle is still 45
+    @Test
+    void testIntersectionAngle3() {
+        Node n1 = nn(1, -10, -10);
+        Node n2 = nn(2, -5, -10);
+        Node n3 = nn(3, -1, -6);
+        Way from = nw(1, n1, n2);
+        Way to = nw(2, n2, n3);
+
+        double a = TurnRestrictionBuilder.intersectionAngle(from, to);
+        assertEquals(45, Math.toDegrees(a), 1e-7);
+
+        /*
+         * if reversed from, the intersection angle is still 45
+         */
+        from = nw(1, n2, n1);
+        to = nw(2, n2, n3);
+        a = TurnRestrictionBuilder.intersectionAngle(from, to);
+        assertEquals(45, Math.toDegrees(a), 1e-7);
+
+        /*
+        * if reversed to, the intersection angle is still 45
+        */
+        from = nw(1, n1, n2);
+        to = nw(2, n3, n2);
+        a = TurnRestrictionBuilder.intersectionAngle(from, to);
+        assertEquals(45, Math.toDegrees(a), 1e-7);
+
+        /*
+        * if reversed both, the intersection angle is still 45
+        */
+        from = nw(1, n2, n1);
+        to = nw(2, n3, n2);
+        a = TurnRestrictionBuilder.intersectionAngle(from, to);
+        assertEquals(45, Math.toDegrees(a), 1e-7);
+    }
+
+    /**
+     *
+     *
+     *         (-1,-14) (n3)
+     *            ^
+     *            \
+     *             \ to
+     *              \
+     *          (-5, -10) n2
+     *               ^
+     *               |
+     *               | from
+     *               |
+     *           (-10,-10) n1
      */
-     from = nw(1, n2, n1);
-     to = nw(2, n3, n2);
-     a = TurnRestrictionBuilder.intersectionAngle(from, to);
-     assertEquals(-45, Math.toDegrees(a), 1e-7);
- }
-
-
-     /*
+    @Test
+    void testIntersectionAngle4() {
+        Node n1 = nn(1, -10, -10);
+        Node n2 = nn(2, -5, -10);
+        Node n3 = nn(3, -1, -14);
+        Way from = nw(1, n1, n2);
+        Way to = nw(2, n2, n3);
+
+        double a = TurnRestrictionBuilder.intersectionAngle(from, to);
+        assertEquals(-45, Math.toDegrees(a), 1e-7);
+
+        /*
+         * if reversed from, the intersection angle is still -45
+         */
+        from = nw(1, n2, n1);
+        to = nw(2, n2, n3);
+        a = TurnRestrictionBuilder.intersectionAngle(from, to);
+        assertEquals(-45, Math.toDegrees(a), 1e-7);
+
+        /*
+        * if reversed to, the intersection angle is still -45
+        */
+        from = nw(1, n1, n2);
+        to = nw(2, n3, n2);
+        a = TurnRestrictionBuilder.intersectionAngle(from, to);
+        assertEquals(-45, Math.toDegrees(a), 1e-7);
+
+        /*
+        * if reversed both, the intersection angle is still 45
+        */
+        from = nw(1, n2, n1);
+        to = nw(2, n3, n2);
+        a = TurnRestrictionBuilder.intersectionAngle(from, to);
+        assertEquals(-45, Math.toDegrees(a), 1e-7);
+    }
+
+    /**
      *
      *      n21        w21        n22       w22            n23
@@ -579,5 +571,5 @@
      */
     @Test
-    public void splitToWay() {
+    void testSplitToWay() {
         Node n11 = new Node(11);
         n11.setCoor(new LatLon(5, 15));
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/AllEditorTests.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/AllEditorTests.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/AllEditorTests.java	(revision 36064)
@@ -2,11 +2,11 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
+import org.junit.platform.suite.api.SelectClasses;
 
 import junit.framework.TestCase;
+import org.junit.platform.suite.api.Suite;
 
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
+@Suite
+@SelectClasses({
     JosmSelectionListModelTest.class,
     TurnRestrictionEditorModelUnitTest.class,
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanelTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanelTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanelTest.java	(revision 36064)
@@ -7,5 +7,5 @@
 import javax.swing.JFrame;
 
-import org.junit.Ignore;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -15,5 +15,5 @@
  *
  */
-@Ignore("no test")
+@Disabled("no test")
 public class BasicEditorPanelTest extends JFrame {
 
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModelTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModelTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModelTest.java	(revision 36064)
@@ -2,25 +2,30 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
-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.assertAll;
+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.assertTrue;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
 
-public class ExceptValueModelTest {
+class ExceptValueModelTest {
 
-    @Test
-    public void testConstructors() {
-        new ExceptValueModel();
-        new ExceptValueModel(null);
-        new ExceptValueModel("");
-        new ExceptValueModel("  ");
-        new ExceptValueModel("hgv");
-        new ExceptValueModel("hgv;psv");
-        new ExceptValueModel("non_standard");
+    @ParameterizedTest
+    @ValueSource(strings = {"", "  ", "hgv", "hgv;psv", "non_standard"})
+    void testStringConstructors(String value) {
+        assertDoesNotThrow(() -> new ExceptValueModel(value));
     }
 
     @Test
-    public void testSetValue() {
+    void testAdditionalConstructors() {
+        assertAll(() -> assertDoesNotThrow(() -> new ExceptValueModel()),
+                () -> assertDoesNotThrow(() -> new ExceptValueModel(null)));
+    }
+
+    @Test
+    void testSetValue() {
         ExceptValueModel evm;
 
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.java	(revision 36064)
@@ -2,7 +2,9 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
-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.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
@@ -14,6 +16,5 @@
 import javax.swing.ListSelectionModel;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -24,26 +25,25 @@
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit test for {@see JosmSelctionListModel}
  */
-public class JosmSelectionListModelTest {
-
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
+@BasicPreferences
+class JosmSelectionListModelTest {
 
     @Test
-    public void testConstructor() {
-        assertNotNull(new JosmSelectionListModel(new OsmDataLayer(new DataSet(), "test", null)));
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConstructorNull() {
-        new JosmSelectionListModel(null);
+    void testConstructor() {
+        OsmDataLayer layer = new OsmDataLayer(new DataSet(), "test", null);
+        assertDoesNotThrow(() -> new JosmSelectionListModel(layer));
     }
 
     @Test
-    public void test_setJOSMSelection() {
+    void testConstructorNull() {
+        assertThrows(IllegalArgumentException.class, () -> new JosmSelectionListModel(null));
+    }
+
+    @Test
+    void testSetJOSMSelection() {
         DataSet ds = new DataSet();
         OsmDataLayer layer = new OsmDataLayer(ds, "test", null);
@@ -66,5 +66,5 @@
 
     @Test
-    public void test_setJOSMSelection_withSelected() {
+    void testSetJOSMSelectionWithSelected() {
         DataSet ds = new DataSet();
         OsmDataLayer layer = new OsmDataLayer(ds, "test", null);
@@ -84,5 +84,5 @@
 
     @Test
-    public void test_getSelected() {
+    void testGetSelected() {
         DataSet ds = new DataSet();
         OsmDataLayer layer = new OsmDataLayer(ds, "test", null);
@@ -105,5 +105,5 @@
 
     @Test
-    public void test_setSelected() {
+    void testSetSelected() {
         // set selected with null is OK - nothing selected thereafter
         JosmSelectionListModel model = new JosmSelectionListModel(new OsmDataLayer(new DataSet(), "test", null));
@@ -118,19 +118,19 @@
         List<OsmPrimitive> objects = (Arrays.asList(new Node(new LatLon(1, 1)), new Way(), new Relation()));
         model.setJOSMSelection(objects);
-        model.setSelected(Arrays.asList(objects.get(0)));
+        model.setSelected(Collections.singletonList(objects.get(0)));
         assertEquals(Collections.singleton(objects.get(0)), model.getSelected());
 
         // select an object not-existing in the list of displayed objects
         model.setJOSMSelection(objects);
-        model.setSelected(Arrays.asList(new Way()));
+        model.setSelected(Collections.singletonList(new Way()));
         assertTrue(model.getSelected().isEmpty());
     }
 
     @Test
-    public void test_editLayerChanged() {
+    void testEditLayerChanged() {
         DataSet ds = new DataSet();
 
         List<OsmPrimitive> objects = (Arrays.asList(new Node(new LatLon(1, 1)), new Way(), new Relation()));
-        objects.stream().forEach(ds::addPrimitive);
+        objects.forEach(ds::addPrimitive);
 
         OsmDataLayer layer1 = new OsmDataLayer(ds, "layer1", null);
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxTest.java	(revision 36064)
@@ -8,5 +8,5 @@
 import javax.swing.JFrame;
 
-import org.junit.Ignore;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -17,5 +17,5 @@
  *
  */
-@Ignore("no test")
+@Disabled("no test")
 public class TurnRestrictionComboBoxTest extends JFrame {
 
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModelUnitTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModelUnitTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModelUnitTest.java	(revision 36064)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
-import static org.junit.Assert.assertEquals;
-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.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 import static org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionLegRole.FROM;
 import static org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionLegRole.TO;
@@ -13,7 +14,6 @@
 import java.util.Collections;
 
-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.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
+import org.openstreetmap.josm.data.osm.PrimitiveId;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.RelationMember;
@@ -26,13 +27,11 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * This is a unit test for {@link TurnRestrictionEditorModel}
  */
-public class TurnRestrictionEditorModelUnitTest {
-
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
+@BasicPreferences
+class TurnRestrictionEditorModelUnitTest {
 
     private final NavigationControler navigationControlerMock = new NavigationControler() {
@@ -114,5 +113,5 @@
     }
 
-    @Before
+    @BeforeEach
     public void setUp() {
         ds = new DataSet();
@@ -124,7 +123,7 @@
      * Test the constructor
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testConstructor1() {
-        new TurnRestrictionEditorModel(null, navigationControlerMock);
+    @Test
+    void testConstructor1() {
+        assertThrows(IllegalArgumentException.class, () -> new TurnRestrictionEditorModel(null, navigationControlerMock));
     }
 
@@ -132,11 +131,11 @@
      * Test the constructor
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testConstructor2() {
-        new TurnRestrictionEditorModel(layer, null);
-    }
-
-    @Test
-    public void testPopulateEmptyTurnRestriction() {
+    @Test
+    void testConstructor2() {
+        assertThrows(IllegalArgumentException.class, () -> new TurnRestrictionEditorModel(layer, null));
+    }
+
+    @Test
+    void testPopulateEmptyTurnRestriction() {
         // an "empty" turn restriction with a public id
         Relation r = new Relation(1);
@@ -156,5 +155,5 @@
      */
     @Test
-    public void test_populate_SimpleStandardTurnRestriction() {
+    void testPopulateSimpleStandardTurnRestriction() {
         buildDataSet1();
         model.populate(rel(1));
@@ -162,5 +161,5 @@
         assertEquals(Collections.singleton(way(2)), model.getTurnRestrictionLeg(FROM));
         assertEquals(Collections.singleton(way(3)), model.getTurnRestrictionLeg(TO));
-        assertEquals(Arrays.asList(node(22)), model.getVias());
+        assertEquals(Collections.singletonList(node(22)), model.getVias());
         assertEquals("no_left_turn", model.getRestrictionTagValue());
         assertEquals("", model.getExcept().getValue());
@@ -168,5 +167,5 @@
 
     @Test
-    public void setFrom() {
+    void testSetFrom() {
         buildDataSet1();
         model.populate(rel(1));
@@ -178,31 +177,22 @@
         // set another way as from
         model.setTurnRestrictionLeg(TurnRestrictionLegRole.FROM, way(4).getPrimitiveId());
-        assertEquals(Collections.singleton(way(4)), model.getTurnRestrictionLeg(TurnRestrictionLegRole.FROM));
+        assertEquals(Collections.singleton(way(4)), model.getTurnRestrictionLeg(FROM));
 
         // delete the/all members with role 'from'
         model.setTurnRestrictionLeg(TurnRestrictionLegRole.FROM, null);
-        assertTrue(model.getTurnRestrictionLeg(TurnRestrictionLegRole.FROM).isEmpty());
-
-        try {
-            // can't add a node as 'from'
-            model.setTurnRestrictionLeg(TurnRestrictionLegRole.FROM, node(21).getPrimitiveId());
-            fail();
-        } catch (IllegalArgumentException e) {
-            // OK
-            System.out.println(e.getMessage());
-        }
-
-        try {
-            // can't set a way as 'from' if it isn't part of the dataset
-            model.setTurnRestrictionLeg(TurnRestrictionLegRole.FROM, new Way().getPrimitiveId());
-            fail();
-        } catch (IllegalStateException e) {
-            // OK
-            System.out.println(e.getMessage());
-        }
-    }
-
-    @Test
-    public void setTo() {
+        assertTrue(model.getTurnRestrictionLeg(FROM).isEmpty());
+
+        // can't add a node as 'from'
+        PrimitiveId node = node(21).getPrimitiveId();
+        assertThrows(IllegalArgumentException.class,
+                () -> model.setTurnRestrictionLeg(TurnRestrictionLegRole.FROM, node));
+
+        // can't set a way as 'from' if it isn't part of the dataset
+        PrimitiveId way = new Way().getPrimitiveId();
+        assertThrows(IllegalStateException.class, () -> model.setTurnRestrictionLeg(TurnRestrictionLegRole.FROM, way));
+    }
+
+    @Test
+    void setTo() {
         buildDataSet1();
         model.populate(rel(1));
@@ -214,27 +204,15 @@
         // set another way as from
         model.setTurnRestrictionLeg(TurnRestrictionLegRole.TO, way(4).getPrimitiveId());
-        assertEquals(Collections.singleton(way(4)), model.getTurnRestrictionLeg(TurnRestrictionLegRole.TO));
+        assertEquals(Collections.singleton(way(4)), model.getTurnRestrictionLeg(TO));
 
         // delete the/all members with role 'from'
         model.setTurnRestrictionLeg(TurnRestrictionLegRole.TO, null);
-        assertTrue(model.getTurnRestrictionLeg(TurnRestrictionLegRole.TO).isEmpty());
-
-        try {
-            // can't add a node as 'from'
-            model.setTurnRestrictionLeg(TurnRestrictionLegRole.TO, node(21).getPrimitiveId());
-            fail();
-        } catch (IllegalArgumentException e) {
-            // OK
-            System.out.println(e.getMessage());
-        }
-
-        try {
-            // can't set a way as 'from' if it isn't part of the dataset
-            model.setTurnRestrictionLeg(TurnRestrictionLegRole.TO, new Way().getPrimitiveId());
-            fail();
-        } catch (IllegalStateException e) {
-            // OK
-            System.out.println(e.getMessage());
-        }
+        assertTrue(model.getTurnRestrictionLeg(TO).isEmpty());
+
+        PrimitiveId node = node(21).getPrimitiveId();
+        assertThrows(IllegalArgumentException.class, () -> model.setTurnRestrictionLeg(TurnRestrictionLegRole.TO, node));
+
+        PrimitiveId way = new Way().getPrimitiveId();
+        assertThrows(IllegalStateException.class, () -> model.setTurnRestrictionLeg(TurnRestrictionLegRole.TO, way));
     }
 
@@ -269,6 +247,6 @@
 
         // one node as via - OK
-        model.setVias(Arrays.asList(node(22)));
-        assertEquals(Arrays.asList(node(22)), model.getVias());
+        model.setVias(Collections.singletonList(node(22)));
+        assertEquals(Collections.singletonList(node(22)), model.getVias());
 
         // pass in null as vias -> remove all vias
@@ -291,9 +269,9 @@
         // null values in the list of vias are skipped
         model.setVias(Arrays.asList(null, node(22)));
-        assertEquals(Arrays.asList(node(22)), model.getVias());
+        assertEquals(Collections.singletonList(node(22)), model.getVias());
 
         try {
             // an object which doesn't belong to the same dataset can't be a via
-            model.setVias(Arrays.asList(new Node(LatLon.ZERO)));
+            model.setVias(Collections.singletonList(new Node(LatLon.ZERO)));
             fail();
         } catch (IllegalArgumentException e) {
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorTest.java	(revision 36064)
@@ -4,5 +4,5 @@
 import javax.swing.JFrame;
 
-import org.junit.Ignore;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -11,5 +11,5 @@
  *
  */
-@Ignore("no test")
+@Disabled("no test")
 public class TurnRestrictionEditorTest extends JFrame {
 
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java	(revision 36064)
@@ -17,5 +17,5 @@
 import javax.swing.JScrollPane;
 
-import org.junit.Ignore;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -34,5 +34,5 @@
  * {@see TurnRestrictionLegEditor}
  */
-@Ignore("no test")
+@Disabled("no test")
 public class TurnRestrictionLegEditorTest extends JFrame {
 
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorUnitTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorUnitTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorUnitTest.java	(revision 36064)
@@ -2,26 +2,24 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
-import static org.junit.Assert.assertEquals;
 
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit test for the {@link TurnRestrictionLegEditor}
  */
-public class TurnRestrictionLegEditorUnitTest {
-
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class TurnRestrictionLegEditorUnitTest {
     private DataSet ds;
     private OsmDataLayer layer;
     private TurnRestrictionEditorModel model;
 
-    @Before
+    @BeforeEach
     public void setUp() {
         ds = new DataSet();
@@ -43,5 +41,5 @@
 
     @Test
-    public void testConstructor1() {
+    void testConstructor1() {
         TurnRestrictionLegEditor editor = new TurnRestrictionLegEditor(model, TurnRestrictionLegRole.FROM);
         assertEquals(model, editor.getModel());
@@ -49,12 +47,12 @@
     }
 
-    @Test(expected = IllegalArgumentException.class)
-    public void testConstructor2() {
-        new TurnRestrictionLegEditor(null, TurnRestrictionLegRole.FROM);
+    @Test
+    void testConstructor2() {
+        assertThrows(IllegalArgumentException.class, () -> new TurnRestrictionLegEditor(null, TurnRestrictionLegRole.FROM));
     }
 
-    @Test(expected = IllegalArgumentException.class)
-    public void testConstructor3() {
-        new TurnRestrictionLegEditor(model, null);
+    @Test
+    void testConstructor3() {
+        assertThrows(IllegalArgumentException.class, () -> new TurnRestrictionLegEditor(model, null));
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRendererTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRendererTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRendererTest.java	(revision 36064)
@@ -2,21 +2,17 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import javax.swing.JLabel;
 
-import org.junit.Rule;
-import org.junit.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.junit.jupiter.api.Test;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-public class TurnRestrictionTypeRendererTest {
-
-    @Rule
-    public JOSMTestRules rules = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class TurnRestrictionTypeRendererTest {
     @Test
-    public void test_Constructor() {
+    void testConstructor() {
         TurnRestrictionTypeRenderer renderer = new TurnRestrictionTypeRenderer();
 
@@ -26,5 +22,5 @@
 
     @Test
-    public void test_getListCellRendererComponent_1() {
+    void testGetListCellRendererComponent1() {
         TurnRestrictionTypeRenderer renderer = new TurnRestrictionTypeRenderer();
 
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeTest.java	(revision 36064)
@@ -2,13 +2,14 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-public class TurnRestrictionTypeTest {
+
+class TurnRestrictionTypeTest {
 
     @Test
-    public void test_fromTagValue() {
+    void testFromTagValue() {
 
         TurnRestrictionType type = TurnRestrictionType.fromTagValue("no_left_turn");
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditorTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditorTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditorTest.java	(revision 36064)
@@ -7,5 +7,5 @@
 import javax.swing.JFrame;
 
-import org.junit.Ignore;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -16,5 +16,5 @@
  *
  */
-@Ignore("no test")
+@Disabled("no test")
 public class VehicleExceptionEditorTest extends JFrame {
     TurnRestrictionEditorModel model;
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListTest.java	(revision 36064)
@@ -11,5 +11,5 @@
 import javax.swing.JList;
 
-import org.junit.Ignore;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -23,5 +23,5 @@
  *
  */
-@Ignore("no test")
+@Disabled("no test")
 public class ViaListTest extends JFrame {
 
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java	(revision 36063)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java	(revision 36064)
@@ -11,5 +11,5 @@
 import javax.swing.JScrollPane;
 
-import org.junit.Ignore;
+import org.junit.jupiter.api.Disabled;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -20,5 +20,5 @@
  * Simple test application for layout and functionality of the issues view.
  */
-@Ignore("no test")
+@Disabled("no test")
 public class IssuesViewTest extends JFrame {
     private IssuesModel model;
