Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/ConflictResolverTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/ConflictResolverTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/ConflictResolverTest.java	(revision 17275)
@@ -2,11 +2,11 @@
 package org.openstreetmap.josm.gui.conflict.pair;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.NoSuchElementException;
 
-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.SequenceCommand;
 import org.openstreetmap.josm.data.conflict.Conflict;
@@ -23,10 +23,10 @@
  * Unit tests of {@link ConflictResolver} class.
  */
-public class ConflictResolverTest {
+class ConflictResolverTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -35,7 +35,7 @@
      * Unit test of {@link ConflictResolver#buildResolveCommand} - empty case.
      */
-    @Test(expected = NoSuchElementException.class)
-    public void testBuildResolveCommandEmpty() {
-        assertNotNull(new ConflictResolver().buildResolveCommand());
+    @Test
+    void testBuildResolveCommandEmpty() {
+        assertThrows(NoSuchElementException.class, () -> new ConflictResolver().buildResolveCommand());
     }
 
@@ -44,5 +44,5 @@
      */
     @Test
-    public void testBuildResolveCommandNode() {
+    void testBuildResolveCommandNode() {
         ConflictResolver resolver = new ConflictResolver();
         Node n1 = new Node(LatLon.SOUTH_POLE);
@@ -60,5 +60,5 @@
      */
     @Test
-    public void testBuildResolveCommandWay() {
+    void testBuildResolveCommandWay() {
         ConflictResolver resolver = new ConflictResolver();
         Way w1 = new Way();
@@ -76,5 +76,5 @@
      */
     @Test
-    public void testBuildResolveCommandRelation() {
+    void testBuildResolveCommandRelation() {
         ConflictResolver resolver = new ConflictResolver();
         Relation r1 = new Relation();
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.conflict.pair.nodes;
 
-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.fail;
+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 java.beans.PropertyChangeEvent;
@@ -19,6 +19,6 @@
 import javax.swing.DefaultListSelectionModel;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.Node;
@@ -34,5 +34,5 @@
  * Unit tests of {@link NodeListMergeModel}.
  */
-public class NodeListMergeModelTest {
+class NodeListMergeModelTest {
 
     private final DatasetFactory my = new DatasetFactory();
@@ -42,5 +42,5 @@
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -79,5 +79,5 @@
             if (idx[i] instanceof Integer) {
                 int j = (Integer) idx[i];
-                assertTrue("expected row " + j + " to be selected", model.isSelectedIndex(j));
+                assertTrue(model.isSelectedIndex(j), "expected row " + j + " to be selected");
                 break;
             }
@@ -90,5 +90,5 @@
             }
             for (int j = rows[0]; j <= rows[1]; j++) {
-                assertTrue("expected row " + j + " to be selected", model.isSelectedIndex(j));
+                assertTrue(model.isSelectedIndex(j), "expected row " + j + " to be selected");
             }
         }
@@ -96,5 +96,5 @@
 
     @Test
-    public void testCopyMyNodesToTop1() {
+    void testCopyMyNodesToTop1() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -118,5 +118,5 @@
 
     @Test
-    public void testCopyMyNodesToTop2() {
+    void testCopyMyNodesToTop2() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -144,5 +144,5 @@
 
     @Test
-    public void testCopyMyNodesToTop3() {
+    void testCopyMyNodesToTop3() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -170,5 +170,5 @@
 
     @Test
-    public void testCopyMyNodesToTop4() {
+    void testCopyMyNodesToTop4() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -197,5 +197,5 @@
 
     @Test
-    public void testCopyMyNodesToEnd1() {
+    void testCopyMyNodesToEnd1() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -218,5 +218,5 @@
 
     @Test
-    public void testCopyMyNodesToEnd2() {
+    void testCopyMyNodesToEnd2() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -243,5 +243,5 @@
 
     @Test
-    public void testCopyMyNodesToEnd3() {
+    void testCopyMyNodesToEnd3() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -270,5 +270,5 @@
 
     @Test
-    public void testCopyMyNodesToEnd4() {
+    void testCopyMyNodesToEnd4() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -303,5 +303,5 @@
 
     @Test
-    public void testCopyMyNodesBeforeCurrent1() {
+    void testCopyMyNodesBeforeCurrent1() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -330,5 +330,5 @@
 
     @Test
-    public void testCopyMyNodesBeforeCurrent2() {
+    void testCopyMyNodesBeforeCurrent2() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -358,5 +358,5 @@
 
     @Test
-    public void testCopyMyNodesBeforeCurrent3() {
+    void testCopyMyNodesBeforeCurrent3() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -393,5 +393,5 @@
     /* ----------------------------------------------------------------------------- */
     @Test
-    public void testCopyMyNodesAfterCurrent1() {
+    void testCopyMyNodesAfterCurrent1() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -420,5 +420,5 @@
 
     @Test
-    public void testCopyMyNodesAfterCurrent2() {
+    void testCopyMyNodesAfterCurrent2() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -449,5 +449,5 @@
 
     @Test
-    public void testCopyMyNodesAfterCurrent3() {
+    void testCopyMyNodesAfterCurrent3() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -482,5 +482,5 @@
     /* ----------------------------------------------------------------------------- */
     @Test
-    public void testMoveUpMergedNodes1() {
+    void testMoveUpMergedNodes1() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -508,5 +508,5 @@
 
     @Test
-    public void testMoveUpMergedNodes2() {
+    void testMoveUpMergedNodes2() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -538,5 +538,5 @@
 
     @Test
-    public void testMoveUpMergedNodes3() {
+    void testMoveUpMergedNodes3() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -571,5 +571,5 @@
     /* ----------------------------------------------------------------------------- */
     @Test
-    public void testMoveDownMergedNodes1() {
+    void testMoveDownMergedNodes1() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -597,5 +597,5 @@
 
     @Test
-    public void testMoveDownMergedNodes2() {
+    void testMoveDownMergedNodes2() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -627,5 +627,5 @@
 
     @Test
-    public void testMoveDownMergedNodes3() {
+    void testMoveDownMergedNodes3() {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -660,5 +660,5 @@
     /* ----------------------------------------------------------------------------- */
     @Test
-    public void testAddPropertyChangeListener() throws ReflectiveOperationException {
+    void testAddPropertyChangeListener() throws ReflectiveOperationException {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -675,5 +675,5 @@
 
     @Test
-    public void testRemovePropertyChangeListener() throws ReflectiveOperationException {
+    void testRemovePropertyChangeListener() throws ReflectiveOperationException {
         NodeListMergeModel model = new NodeListMergeModel();
 
@@ -693,5 +693,5 @@
     /* ----------------------------------------------------------------------------- */
     @Test
-    public void testSetFrozen() {
+    void testSetFrozen() {
         NodeListMergeModel model = new NodeListMergeModel();
         model.setFrozen(true);
@@ -703,5 +703,5 @@
 
     @Test
-    public void testSetFrozenWithPropertyChangeNotification() {
+    void testSetFrozenWithPropertyChangeNotification() {
         NodeListMergeModel model = new NodeListMergeModel();
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.conflict.pair.nodes;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -13,10 +13,10 @@
  * Unit tests of {@link NodeListMerger} class.
  */
-public class NodeListMergerTest {
+class NodeListMergerTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testNodeListMerger() {
+    void testNodeListMerger() {
         assertNotNull(new NodeListMerger());
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java	(revision 17275)
@@ -2,14 +2,14 @@
 package org.openstreetmap.josm.gui.conflict.pair.properties;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.conflict.Conflict;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -27,5 +27,5 @@
  * Unit tests of {@link PropertiesMergeModel}.
  */
-public class PropertiesMergeModelTest {
+class PropertiesMergeModelTest {
 
     private abstract static class TestChangeListener implements ChangeListener {
@@ -50,5 +50,5 @@
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -57,5 +57,5 @@
      * Setup test.
      */
-    @Before
+    @BeforeEach
     public void setUp() {
         model = new PropertiesMergeModel();
@@ -67,5 +67,5 @@
 
     @Test
-    public void testPopulate() {
+    void testPopulate() {
         DataSet d1 = new DataSet();
         DataSet d2 = new DataSet();
@@ -90,5 +90,5 @@
 
     @Test
-    public void testDecidingAboutCoords() {
+    void testDecidingAboutCoords() {
         DataSet d1 = new DataSet();
         DataSet d2 = new DataSet();
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.conflict.pair.properties;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
@@ -14,10 +14,10 @@
  * Unit tests of {@link PropertiesMerger} class.
  */
-public class PropertiesMergerTest {
+class PropertiesMergerTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -27,5 +27,5 @@
      */
     @Test
-    public void testPropertiesMerger() {
+    void testPropertiesMerger() {
         PropertiesMerger merger = new PropertiesMerger();
         assertNotNull(TestUtils.getComponentByName(merger, "button.keepmycoordinates"));
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.conflict.pair.relation;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -13,10 +13,10 @@
  * Unit tests of {@link RelationMemberMerger} class.
  */
-public class RelationMemberMergerTest {
+class RelationMemberMergerTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testRelationMemberMerger() {
+    void testRelationMemberMerger() {
         assertNotNull(new RelationMemberMerger());
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditorTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditorTest.java	(revision 17275)
@@ -2,12 +2,12 @@
 package org.openstreetmap.josm.gui.conflict.pair.relation;
 
-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.awt.Component;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.RelationMember;
@@ -19,10 +19,10 @@
  * Unit tests of {@link RelationMemberTableCellEditor} class.
  */
-public class RelationMemberTableCellEditorTest {
+class RelationMemberTableCellEditorTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -32,5 +32,5 @@
      */
     @Test
-    public void testRelationMemberTableCellEditor() {
+    void testRelationMemberTableCellEditor() {
         RelationMemberTableCellEditor editor = new RelationMemberTableCellEditor();
         assertNull(editor.getTableCellEditorComponent(null, null, false, 0, 0));
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRendererTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRendererTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRendererTest.java	(revision 17275)
@@ -2,10 +2,10 @@
 package org.openstreetmap.josm.gui.conflict.pair.relation;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import javax.swing.JTable;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.RelationMember;
@@ -19,10 +19,10 @@
  * Unit tests of {@link RelationMemberTableCellRenderer} class.
  */
-public class RelationMemberTableCellRendererTest {
+class RelationMemberTableCellRendererTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -32,5 +32,5 @@
      */
     @Test
-    public void testRelationMemberTableCellRenderer() {
+    void testRelationMemberTableCellRenderer() {
         JTable table = new JTable(new NodeListMergeModel().new EntriesTableModel(ListRole.MY_ENTRIES));
         RelationMember member = new RelationMember("foo", new Node());
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItemTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItemTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItemTest.java	(revision 17275)
@@ -2,10 +2,10 @@
 package org.openstreetmap.josm.gui.conflict.pair.tags;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-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.fail;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
@@ -18,15 +18,15 @@
  * Unit tests of {@link TagMergeItem} class.
  */
-public class TagMergeItemTest {
+class TagMergeItemTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
 
     @Test
-    public void testTagMergeItem() {
+    void testTagMergeItem() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
         assertEquals("key", item.getKey());
@@ -37,5 +37,5 @@
 
     @Test
-    public void testTagMergeItem2() {
+    void testTagMergeItem2() {
         Node n1 = new Node(1);
         Node n2 = new Node(1);
@@ -51,5 +51,5 @@
 
     @Test
-    public void testTagMergeItem3() {
+    void testTagMergeItem3() {
         Node n1 = new Node(1);
         Node n2 = new Node(1);
@@ -65,5 +65,5 @@
 
     @Test
-    public void testTagMergeItem4() {
+    void testTagMergeItem4() {
         Node n1 = new Node(1);
         Node n2 = new Node(1);
@@ -80,5 +80,5 @@
 
     @Test
-    public void testDecide() {
+    void testDecide() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
         item.decide(MergeDecisionType.KEEP_MINE);
@@ -87,5 +87,5 @@
 
     @Test
-    public void testDecide1() {
+    void testDecide1() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
         try {
@@ -99,5 +99,5 @@
 
     @Test
-    public void testApplyToMyPrimitive() {
+    void testApplyToMyPrimitive() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
         item.decide(MergeDecisionType.KEEP_MINE);
@@ -114,5 +114,5 @@
 
     @Test
-    public void testApplyToMyPrimitive2() {
+    void testApplyToMyPrimitive2() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
         item.decide(MergeDecisionType.KEEP_THEIR);
@@ -129,5 +129,5 @@
 
     @Test
-    public void testApplyToMyPrimitive3() {
+    void testApplyToMyPrimitive3() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
         // item is undecided
@@ -146,5 +146,5 @@
 
     @Test
-    public void testApplyToMyPrimitive4() {
+    void testApplyToMyPrimitive4() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModelTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModelTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.gui.conflict.pair.tags;
 
-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 java.beans.PropertyChangeListener;
@@ -9,6 +9,6 @@
 import java.util.Set;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.Node;
@@ -22,10 +22,10 @@
  */
 @SuppressWarnings("unchecked")
-public class TagMergeModelTest {
+class TagMergeModelTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -40,5 +40,5 @@
 
     @Test
-    public void testAddPropertyChangeListener() throws ReflectiveOperationException {
+    void testAddPropertyChangeListener() throws ReflectiveOperationException {
         TagMergeModel model = new TagMergeModel();
         PropertyChangeListener listener = evt -> {
@@ -53,5 +53,5 @@
 
     @Test
-    public void testRemovePropertyChangeListener() throws ReflectiveOperationException {
+    void testRemovePropertyChangeListener() throws ReflectiveOperationException {
         TagMergeModel model = new TagMergeModel();
         PropertyChangeListener listener = evt -> {
@@ -66,5 +66,5 @@
 
     @Test
-    public void testPopulateNoConflichts() throws ReflectiveOperationException {
+    void testPopulateNoConflichts() throws ReflectiveOperationException {
         Node my = new Node(1);
         Node their = new Node(1);
@@ -78,5 +78,5 @@
 
     @Test
-    public void testPopulateNoConflicts1() throws ReflectiveOperationException {
+    void testPopulateNoConflicts1() throws ReflectiveOperationException {
         Node my = new Node(1);
         my.put("key", "value");
@@ -92,5 +92,5 @@
 
     @Test
-    public void testPopulateMissingKeyMine() throws ReflectiveOperationException {
+    void testPopulateMissingKeyMine() throws ReflectiveOperationException {
         Node my = new Node(1);
         Node their = new Node(1);
@@ -110,5 +110,5 @@
 
     @Test
-    public void testPopulateMissingKeyTheir() throws ReflectiveOperationException {
+    void testPopulateMissingKeyTheir() throws ReflectiveOperationException {
         Node my = new Node(1);
         my.put("key", "value");
@@ -128,5 +128,5 @@
 
     @Test
-    public void testPopulateConflictingValues() throws ReflectiveOperationException {
+    void testPopulateConflictingValues() throws ReflectiveOperationException {
         Node my = new Node(1);
         my.put("key", "myvalue");
@@ -147,5 +147,5 @@
 
     @Test
-    public void testAddItem() throws ReflectiveOperationException {
+    void testAddItem() throws ReflectiveOperationException {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
         TagMergeModel model = new TagMergeModel();
@@ -163,5 +163,5 @@
 
     @Test
-    public void testDecide() throws ReflectiveOperationException {
+    void testDecide() throws ReflectiveOperationException {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
         TagMergeModel model = new TagMergeModel();
@@ -187,5 +187,5 @@
 
     @Test
-    public void testDecideMultiple() throws ReflectiveOperationException {
+    void testDecideMultiple() throws ReflectiveOperationException {
 
         TagMergeModel model = new TagMergeModel();
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.conflict.pair.tags;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -13,10 +13,10 @@
  * Unit tests of {@link TagMerger} class.
  */
-public class TagMergerTest {
+class TagMergerTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testTagMerger() {
+    void testTagMerger() {
         assertNotNull(new TagMerger());
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditorTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditorTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.conflict.tags;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -13,10 +13,10 @@
  * Unit tests of {@link MultiValueCellEditor} class.
  */
-public class MultiValueCellEditorTest {
+class MultiValueCellEditorTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testMultiValueCellEditor() {
+    void testMultiValueCellEditor() {
         assertNotNull(new MultiValueCellEditor().getTableCellEditorComponent(null, new MultiValueResolutionDecision(), false, 0, 0));
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRendererTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRendererTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRendererTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.gui.conflict.tags;
 
-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.util.Arrays;
@@ -10,6 +10,6 @@
 import javax.swing.JTable;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.data.osm.TagCollection;
@@ -21,10 +21,10 @@
  * Unit tests of {@link MultiValueCellRenderer} class.
  */
-public class MultiValueCellRendererTest {
+class MultiValueCellRendererTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -34,5 +34,5 @@
      */
     @Test
-    public void testMultiValueCellRenderer() {
+    void testMultiValueCellRenderer() {
         TagConflictResolverModel model = new TagConflictResolverModel();
         TagCollection tags = new TagCollection(Arrays.asList(new Tag("oneway", "yes"), new Tag("oneway", "no")));
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialogTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialogTest.java	(revision 17275)
@@ -2,13 +2,13 @@
 package org.openstreetmap.josm.gui.conflict.tags;
 
-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.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 java.awt.Insets;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.gui.conflict.tags.PasteTagsConflictResolverDialog.StatisticsInfo;
@@ -22,10 +22,10 @@
  * Unit tests of {@link PasteTagsConflictResolverDialog} class.
  */
-public class PasteTagsConflictResolverDialogTest {
+class PasteTagsConflictResolverDialogTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -35,5 +35,5 @@
      */
     @Test
-    public void testPaneTitles() {
+    void testPaneTitles() {
         assertNotNull(PasteTagsConflictResolverDialog.PANE_TITLES);
         assertNotNull(PasteTagsConflictResolverDialog.PANE_TITLES.get(OsmPrimitiveType.NODE));
@@ -46,5 +46,5 @@
      */
     @Test
-    public void testStatisticsInfoTable() {
+    void testStatisticsInfoTable() {
         StatisticsInfo info = new StatisticsInfo();
         StatisticsTableModel model = new StatisticsTableModel();
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModelTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModelTest.java	(revision 17275)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.gui.conflict.tags;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Arrays;
@@ -10,6 +10,6 @@
 import java.util.List;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -25,10 +25,10 @@
  * Unit tests of {@link RelationMemberConflictResolverModel} class.
  */
-public class RelationMemberConflictResolverModelTest {
+class RelationMemberConflictResolverModelTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -58,5 +58,5 @@
 
     @Test
-    public void testSameRoles() throws Exception {
+    void testSameRoles() throws Exception {
         final List<Way> ways = buildTestDataSet();
         final Relation r = new Relation();
@@ -76,5 +76,5 @@
 
     @Test
-    public void testDifferentRoles() throws Exception {
+    void testDifferentRoles() throws Exception {
         final List<Way> ways = buildTestDataSet();
         final Relation r = new Relation();
@@ -89,5 +89,5 @@
 
     @Test
-    public void testDifferentPresence() throws Exception {
+    void testDifferentPresence() throws Exception {
         final List<Way> ways = buildTestDataSet();
         final Relation r = new Relation();
@@ -101,5 +101,5 @@
 
     @Test
-    public void testEveryMemberIsPresentTwice() throws Exception {
+    void testEveryMemberIsPresentTwice() throws Exception {
         final List<Way> ways = buildTestDataSet();
         final Relation r = new Relation();
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.conflict.tags;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -13,10 +13,10 @@
  * Unit tests of {@link RelationMemberConflictResolver} class.
  */
-public class RelationMemberConflictResolverTest {
+class RelationMemberConflictResolverTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -26,5 +26,5 @@
      */
     @Test
-    public void testRelationMemberConflictResolver() {
+    void testRelationMemberConflictResolver() {
         assertNotNull(new RelationMemberConflictResolver(null));
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtilTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtilTest.java	(revision 16913)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtilTest.java	(revision 17275)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.gui.conflict.tags;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.Arrays;
@@ -11,8 +12,9 @@
 import java.util.HashSet;
 import java.util.List;
+import java.util.regex.PatternSyntaxException;
 import java.util.stream.Collectors;
 
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.data.osm.TagCollection;
@@ -27,10 +29,10 @@
  * Unit tests of {@link TagConflictResolutionUtil} class.
  */
-public class TagConflictResolutionUtilTest {
+class TagConflictResolutionUtilTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -45,5 +47,5 @@
      */
     @Test
-    public void testApplyAutomaticTagConflictResolution() {
+    void testApplyAutomaticTagConflictResolution() {
         // Check that general tag conflict are not resolved
         TagCollection tc = new TagCollection();
@@ -106,5 +108,5 @@
      * Unit tests of {@link AutomaticCombine} class.
      */
-    public static class AutomaticCombineTest {
+    static class AutomaticCombineTest {
 
         /**
@@ -127,5 +129,5 @@
          * Setup test.
          */
-        @Rule
+        @RegisterExtension
         @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
         public JOSMTestRules test = new JOSMTestRules();
@@ -135,5 +137,5 @@
          */
         @Test
-        public void testMatchesKeyEmptyKey() {
+        void testMatchesKeyEmptyKey() {
             for (AutomaticCombine resolver: differentlyConstructed(new AutomaticCombine("", "random description", true, ";", null))) {
                 assertFalse(resolver.matchesKey("a"));
@@ -146,5 +148,5 @@
          */
         @Test
-        public void testMatchesKeyNotRegex() {
+        void testMatchesKeyNotRegex() {
             for (AutomaticCombine resolver: differentlyConstructed(new AutomaticCombine(
                     "keyname", "random description", false, "|", null))) {
@@ -161,5 +163,5 @@
          */
         @Test
-        public void testMatchesKeyRegex() {
+        void testMatchesKeyRegex() {
             for (AutomaticCombine resolver: differentlyConstructed(new AutomaticCombine("test[45].*", "", true, ";", "Integer"))) {
                 assertFalse(resolver.matchesKey("key"));
@@ -173,5 +175,5 @@
          */
         @Test
-        public void testInvalidRegex() {
+        void testInvalidRegex() {
             for (AutomaticCombine resolver: differentlyConstructed(new AutomaticCombine("invalidregex.(]", "", false, ";", null))) {
                 // Should not raise exception if the resolver.isRexEx == false:
@@ -188,20 +190,19 @@
          * Unit test of {@link AutomaticCombine} with invalid regex.
          */
-        @Test(expected = java.util.regex.PatternSyntaxException.class)
-        public void testInvalidRegexExceptionDefaultConstructed() {
+        @Test
+        void testInvalidRegexExceptionDefaultConstructed() {
             AutomaticCombine resolver = new AutomaticCombine("AB.(]", "", true, ";", null);
-            resolver.matchesKey("AB");
-        }
-
+            assertThrows(PatternSyntaxException.class, () -> resolver.matchesKey("AB"));
+        }
 
         /**
          * Unit test of {@link AutomaticCombine} with invalid regex.
          */
-        @Test(expected = java.util.regex.PatternSyntaxException.class)
-        public void testInvalidRegexExceptionFullyConstructed() {
+        @Test
+        void testInvalidRegexExceptionFullyConstructed() {
             AutomaticCombine resolver = new AutomaticCombine();
             resolver.key = "AB.(]";
             resolver.isRegex = true;
-            resolver.matchesKey("AB");
+            assertThrows(PatternSyntaxException.class, () -> resolver.matchesKey("AB"));
         }
 
@@ -210,5 +211,5 @@
          */
         @Test
-        public void testResolve() {
+        void testResolve() {
             for (AutomaticCombine resolver: differentlyConstructed(new AutomaticCombine("random", "", true, "|", "String"))) {
                 assertEquals(resolver.resolve(newHashSet("value1", "value2")), "value1|value2");
@@ -230,9 +231,9 @@
      * Unit tests of {@link AutomaticChoice} class.
      */
-    public static class AutomaticChoiceTest {
+    static class AutomaticChoiceTest {
         /**
          * Setup test.
          */
-        @Rule
+        @RegisterExtension
         @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
         public JOSMTestRules test = new JOSMTestRules();
@@ -260,5 +261,5 @@
          */
         @Test
-        public void testMatchesValue() {
+        void testMatchesValue() {
             for (AutomaticChoice resolver: differentlyConstructed(new AutomaticChoice(
                     "random key", "random group", "random description", false, ".*valueToMatch", "Score$0\\1"))) {
@@ -282,5 +283,5 @@
          */
         @Test
-        public void testComputeScoreFromValue() {
+        void testComputeScoreFromValue() {
             for (AutomaticChoice resolver: differentlyConstructed(new AutomaticChoice(
                     "random key", "random group", "random description", false, ".*valueToMatch", "Score$0\\1"))) {
@@ -298,5 +299,5 @@
          */
         @Test
-        public void testInvalidRegex() {
+        void testInvalidRegex() {
             for (AutomaticChoice resolver: differentlyConstructed(new AutomaticChoice(
                     "k", "g", "", false, "invalidregex.(]", "InvalidScore$0\\1$-4"))) {
@@ -316,8 +317,8 @@
          * Unit test of {@link AutomaticChoice} when invalid regex is used.
          */
-        @Test(expected = java.util.regex.PatternSyntaxException.class)
-        public void testMatchesValueInvalidRegex() {
+        @Test
+        void testMatchesValueInvalidRegex() {
             AutomaticChoice resolver = new AutomaticChoice("k", "g", "", true, "invalidregex.(]", "InvalidScore$0\\1$-4");
-            resolver.matchesValue("test");
+            assertThrows(PatternSyntaxException.class, () -> resolver.matchesValue("test"));
         }
 
@@ -325,10 +326,9 @@
          * Unit test of {@link AutomaticChoice} when invalid regex is used.
          */
-        @Test(expected = java.util.regex.PatternSyntaxException.class)
-        public void testComputeScoreFromValueInvalidRegex() {
+        @Test
+        void testComputeScoreFromValueInvalidRegex() {
             AutomaticChoice resolver = new AutomaticChoice("k", "g", "", true, "invalidregex.(]", "valid");
-            resolver.computeScoreFromValue("valid");
-        }
-
+            assertThrows(PatternSyntaxException.class, () -> resolver.computeScoreFromValue("valid"));
+        }
 
         /**
@@ -336,5 +336,5 @@
          */
         @Test
-        public void testComputeScoreFromValueInvalidReplacement() {
+        void testComputeScoreFromValueInvalidReplacement() {
             AutomaticChoice resolver = new AutomaticChoice("k", "g", "", true, "valid", "InvalidScore$0\\1$-4");
             boolean exceptionThrown = false;
@@ -351,9 +351,9 @@
      * Unit tests of {@link AutomaticChoiceGroup} class.
      */
-    public static class AutomaticChoiceGroupTest {
+    static class AutomaticChoiceGroupTest {
         /**
          * Setup test.
          */
-        @Rule
+        @RegisterExtension
         @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
         public JOSMTestRules test = new JOSMTestRules();
@@ -373,5 +373,5 @@
          */
         @Test
-        public void testGroupChoices() {
+        void testGroupChoices() {
             Collection<AutomaticChoiceGroup> groups = AutomaticChoiceGroup.groupChoices(Arrays.asList(choiceKey1Group1, choiceKey1Group2));
             assertEquals(2, groups.size());
@@ -405,5 +405,5 @@
          */
         @Test
-        public void testMatchesKey() {
+        void testMatchesKey() {
             AutomaticChoiceGroup group = new AutomaticChoiceGroup(
                     choiceKey1Group1.key, choiceKey1Group1.group, choiceKey1Group1.isRegex,
@@ -427,5 +427,5 @@
          */
         @Test
-        public void testResolve() {
+        void testResolve() {
             AutomaticChoiceGroup group = new AutomaticChoiceGroup(
                     choiceKey1Group1.key, choiceKey1Group1.group, choiceKey1Group1.isRegex,
