Index: /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/EditLevel0LActionTest.java
===================================================================
--- /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/EditLevel0LActionTest.java	(revision 35933)
+++ /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/EditLevel0LActionTest.java	(revision 35934)
@@ -11,6 +11,6 @@
 import java.util.List;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.command.MoveCommand;
@@ -28,13 +28,15 @@
 import net.simon04.comfort0.level0l.parsergen.Level0LParser;
 import net.simon04.comfort0.level0l.parsergen.ParseException;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-public class EditLevel0LActionTest {
+@BasicPreferences
+class EditLevel0LActionTest {
 
     /**
      * Setup rule
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().projection();
+    JOSMTestRules test = new JOSMTestRules().projection();
 
     private SequenceCommand buildChangeCommands(DataSet dataSet) throws ParseException {
@@ -55,5 +57,5 @@
 
     @Test
-    public void test() throws Exception {
+    void test() throws Exception {
         final Node node = new Node(1831881213, 42);
         node.setCoor(new LatLon(54.0900666, 12.2539381));
Index: /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/OsmToLevel0LTest.java
===================================================================
--- /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/OsmToLevel0LTest.java	(revision 35933)
+++ /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/OsmToLevel0LTest.java	(revision 35934)
@@ -1,36 +1,28 @@
 package net.simon04.comfort0;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.io.InputStream;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.openstreetmap.josm.data.Preferences;
+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;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.io.OsmReader;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-public class OsmToLevel0LTest {
+import java.io.InputStream;
 
-    /**
-     * Setup rule
-     */
-    @Rule
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
 
-    @Before
-    public void setUp() throws Exception {
-        Preferences.main().putBoolean("osm-primitives.showcoor", true);
+@BasicPreferences
+class OsmToLevel0LTest {
+
+    @BeforeEach
+    public void setUp() {
+        Config.getPref().putBoolean("osm-primitives.showcoor", true);
     }
 
     @Test
-    public void testNode() throws Exception {
+    void testNode() {
         final Node node = new Node(1234L, 42);
         node.setCoor(new LatLon(123.45, 67.89));
@@ -44,5 +36,5 @@
 
     @Test
-    public void testLargerExample() throws Exception {
+    void testLargerExample() throws Exception {
         // from https://wiki.openstreetmap.org/wiki/OSM_XML#OSM_XML_file_format
         // compare to https://wiki.openstreetmap.org/wiki/Level0L#Examples
Index: /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/level0l/parsergen/Level0LParserTest.java
===================================================================
--- /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/level0l/parsergen/Level0LParserTest.java	(revision 35933)
+++ /applications/editors/josm/plugins/comfort0/test/unit/net/simon04/comfort0/level0l/parsergen/Level0LParserTest.java	(revision 35934)
@@ -3,5 +3,5 @@
 import static org.CustomMatchers.hasSize;
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.io.StringReader;
@@ -9,6 +9,5 @@
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.NodeData;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
@@ -17,16 +16,10 @@
 import org.openstreetmap.josm.data.osm.WayData;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-public class Level0LParserTest {
-
-    /**
-     * Setup rule
-     */
-    @Rule
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
+@BasicPreferences
+class Level0LParserTest {
     @Test
-    public void testNode() throws Exception {
+    void testNode() throws Exception {
         final String level0l = "" +
                 "node 298884272: 54.0901447, 12.2516513\n" +
@@ -43,5 +36,5 @@
 
     @Test
-    public void testWay() throws Exception {
+    void testWay() throws Exception {
         final String level0l = "" +
                 "way 26659127\n" +
@@ -63,5 +56,5 @@
 
     @Test
-    public void testRelation() throws Exception {
+    void testRelation() throws Exception {
         final String level0l = "" +
                 "relation 56688 # member types: nd, wy, rel; roles are put after ids\n" +
@@ -90,5 +83,5 @@
 
     @Test
-    public void testExampleFromDocs() throws Exception {
+    void testExampleFromDocs() throws Exception {
         // https://wiki.openstreetmap.org/wiki/Level0L#Examples
         final String level0l = "" +
