Index: trunk/test/unit/org/openstreetmap/josm/command/AddCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/AddCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/AddCommandTest.java	(revision 17275)
@@ -2,11 +2,11 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 
-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.coor.LatLon;
@@ -27,10 +27,10 @@
  * Unit tests of {@link AddCommand} class.
  */
-public class AddCommandTest {
+class AddCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -40,5 +40,5 @@
      */
     @Test
-    public void testAdd() {
+    void testAdd() {
         DataSet ds = new DataSet();
         assertArrayEquals(new Object[0], ds.allPrimitives().toArray());
@@ -56,5 +56,5 @@
      */
     @Test
-    public void testAddToLayer() {
+    void testAddToLayer() {
         DataSet ds1 = new DataSet();
         DataSet ds2 = new DataSet();
@@ -71,5 +71,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         Node osm = new Node(LatLon.ZERO);
         DataSet ds = new DataSet(osm);
@@ -86,5 +86,5 @@
      */
     @Test
-    public void testParticipatingPrimitives() {
+    void testParticipatingPrimitives() {
         Node osm = new Node(LatLon.ZERO);
 
@@ -96,5 +96,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         Node osm = new Node(LatLon.ZERO);
 
@@ -112,5 +112,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         Node node = new Node(LatLon.ZERO);
         node.put("name", "xy");
@@ -131,5 +131,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(AddCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+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 java.util.ArrayList;
@@ -12,6 +12,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.TestUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -34,10 +34,10 @@
  * Unit tests of {@link AddPrimitivesCommand} class.
  */
-public class AddPrimitivesCommandTest {
+class AddPrimitivesCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -47,5 +47,5 @@
      */
     @Test
-    public void testAdd() {
+    void testAdd() {
         DataSet ds = new DataSet();
 
@@ -61,5 +61,5 @@
      */
     @Test
-    public void testAddSetSelection() {
+    void testAddSetSelection() {
         DataSet ds = new DataSet();
 
@@ -77,5 +77,5 @@
      */
     @Test
-    public void testAddToLayer() {
+    void testAddToLayer() {
         DataSet ds1 = new DataSet();
         DataSet ds2 = new DataSet();
@@ -95,5 +95,5 @@
      */
     @Test
-    public void testAddIgnoresExisting() {
+    void testAddIgnoresExisting() {
         DataSet ds = new DataSet();
 
@@ -114,5 +114,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         DataSet ds = new DataSet();
 
@@ -138,5 +138,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         DataSet ds = new DataSet();
 
@@ -172,5 +172,5 @@
      */
     @Test
-    public void testUndoIgnoresExisting() {
+    void testUndoIgnoresExisting() {
         DataSet ds = new DataSet();
 
@@ -208,5 +208,5 @@
      */
     @Test
-    public void testUndoIgnoresExistingAsDeleted() {
+    void testUndoIgnoresExistingAsDeleted() {
         DataSet ds = new DataSet();
 
@@ -243,5 +243,5 @@
      */
     @Test
-    public void testUndoIgnoresExistingSameUniqueIdDifferentType() {
+    void testUndoIgnoresExistingSameUniqueIdDifferentType() {
         DataSet ds = new DataSet();
 
@@ -288,5 +288,5 @@
      */
     @Test
-    public void testParticipatingPrimitives() {
+    void testParticipatingPrimitives() {
         DataSet ds = new DataSet();
 
@@ -308,5 +308,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -364,5 +364,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(AddPrimitivesCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java	(revision 17275)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-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.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+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.ArrayList;
@@ -11,7 +12,7 @@
 import java.util.List;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -34,10 +35,10 @@
  * Unit tests of {@link ChangeCommand} class.
  */
-public class ChangeCommandTest {
+class ChangeCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -47,5 +48,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestData();
@@ -55,8 +56,8 @@
      * Test that empty ways are prevented.
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testPreventEmptyWays() {
+    @Test
+    void testPreventEmptyWays() {
         Way emptyWay = new Way();
-        new ChangeCommand(testData.existingWay, emptyWay);
+        assertThrows(IllegalArgumentException.class, () -> new ChangeCommand(testData.existingWay, emptyWay));
     }
 
@@ -65,5 +66,5 @@
      */
     @Test
-    public void testChange() {
+    void testChange() {
         Node newNode = new Node(5);
         newNode.setCoor(LatLon.NORTH_POLE);
@@ -88,10 +89,10 @@
      * Test {@link ChangeCommand#executeCommand()} fails if ID is changed
      */
-    @Test(expected = DataIntegrityProblemException.class)
-    public void testChangeIdChange() {
+    @Test
+    void testChangeIdChange() {
         Node newNode = new Node(1);
         newNode.setCoor(LatLon.NORTH_POLE);
 
-        new ChangeCommand(testData.existingNode, newNode).executeCommand();
+        assertThrows(DataIntegrityProblemException.class, () -> new ChangeCommand(testData.existingNode, newNode).executeCommand());
     }
 
@@ -100,5 +101,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         Node newNode = new Node(5);
         newNode.setCoor(LatLon.NORTH_POLE);
@@ -121,5 +122,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -135,5 +136,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         Node node = new Node(LatLon.ZERO);
         node.put("name", "xy");
@@ -154,5 +155,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ChangeCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/ChangeMembersCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/ChangeMembersCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/ChangeMembersCommandTest.java	(revision 17275)
@@ -2,13 +2,13 @@
 package org.openstreetmap.josm.command;
 
-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.Collections;
 import java.util.List;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -28,10 +28,10 @@
  * Unit tests of {@link ChangeMembersCommand} class.
  */
-public class ChangeMembersCommandTest {
+class ChangeMembersCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -41,5 +41,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestDataWithRelation();
@@ -50,5 +50,5 @@
      */
     @Test
-    public void testChange() {
+    void testChange() {
         assertTrue(testData.existingNode.getReferrers().contains(testData.existingRelation));
         assertEquals(2, testData.existingRelation.getMembersCount());
@@ -70,5 +70,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         List<RelationMember> members = testData.existingRelation.getMembers();
         members.add(new RelationMember("n2", testData.existingNode2));
@@ -86,5 +86,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         testData.existingRelation.put("name", "xy");
         List<RelationMember> members = testData.existingRelation.getMembers();
@@ -97,5 +97,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ChangeMembersCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java	(revision 17275)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-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.assertArrayEquals;
+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 static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
@@ -12,7 +13,7 @@
 import java.util.List;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -33,10 +34,10 @@
  * Unit tests of {@link ChangeNodesCommand} class.
  */
-public class ChangeNodesCommandTest {
+class ChangeNodesCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -46,5 +47,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestData();
@@ -54,7 +55,7 @@
      * Test that empty ways are prevented.
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testPreventEmptyWays() {
-        new ChangeNodesCommand(testData.existingWay, Collections.<Node>emptyList());
+    @Test
+    void testPreventEmptyWays() {
+        assertThrows(IllegalArgumentException.class, () -> new ChangeNodesCommand(testData.existingWay, Collections.<Node>emptyList()));
     }
 
@@ -63,5 +64,5 @@
      */
     @Test
-    public void testChange() {
+    void testChange() {
         List<Node> newNodes = testData.existingWay.getNodes();
         Collections.reverse(newNodes);
@@ -79,5 +80,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         List<Node> newNodes = testData.existingWay.getNodes();
         Collections.reverse(newNodes);
@@ -95,5 +96,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -110,5 +111,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         Node node = new Node(LatLon.ZERO);
         node.put("name", "xy");
@@ -125,5 +126,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ChangeNodesCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java	(revision 17275)
@@ -2,9 +2,9 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-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.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
@@ -14,7 +14,7 @@
 import java.util.List;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -36,10 +36,10 @@
  * Unit tests of {@link ChangePropertyCommand} class.
  */
-public class ChangePropertyCommandTest {
+class ChangePropertyCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -49,5 +49,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestData();
@@ -58,5 +58,5 @@
      */
     @Test
-    public void testShortConstructor() {
+    void testShortConstructor() {
         ChangePropertyCommand command = new ChangePropertyCommand(Arrays.asList(testData.existingNode), "a", "b");
         assertEquals("b", command.getTags().get("a"));
@@ -74,5 +74,5 @@
      */
     @Test
-    public void testUpdateSingleProperty() {
+    void testUpdateSingleProperty() {
         Node node1 = testData.createNode(14);
         Node node2 = testData.createNode(15);
@@ -93,5 +93,5 @@
      */
     @Test
-    public void testRemoveProperty() {
+    void testRemoveProperty() {
         Node node1 = testData.createNode(14);
         Node node2 = testData.createNode(15);
@@ -112,5 +112,5 @@
      */
     @Test
-    public void testUpdateMultipleProperties() {
+    void testUpdateMultipleProperties() {
         Node node1 = testData.createNode(14);
         Node node2 = testData.createNode(15);
@@ -139,5 +139,5 @@
      */
     @Test
-    public void testUpdateIgnoresExistingProperty() {
+    void testUpdateIgnoresExistingProperty() {
         Node node1 = testData.createNode(14);
         Node node2 = testData.createNode(15);
@@ -159,5 +159,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         Node node1 = testData.createNode(14);
         Node node2 = testData.createNode(15);
@@ -188,5 +188,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         Node node1 = testData.createNode(14);
         Node node2 = testData.createNode(15);
@@ -252,5 +252,5 @@
      */
     @Test
-    public void testChildren() {
+    void testChildren() {
         Node node1 = testData.createNode(15);
         Node node2 = testData.createNode(16);
@@ -278,5 +278,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ChangePropertyCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java	(revision 17275)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
@@ -11,7 +11,7 @@
 import java.util.Collection;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -30,10 +30,10 @@
  * Unit tests of {@link ChangePropertyKeyCommand} class.
  */
-public class ChangePropertyKeyCommandTest {
+class ChangePropertyKeyCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -43,5 +43,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestData();
@@ -52,5 +52,5 @@
      */
     @Test
-    public void testChangeKeySingle() {
+    void testChangeKeySingle() {
         assertTrue(new ChangePropertyKeyCommand(testData.existingNode, "existing", "newKey").executeCommand());
 
@@ -64,5 +64,5 @@
      */
     @Test
-    public void testChangeKey() {
+    void testChangeKey() {
         assertTrue(new ChangePropertyKeyCommand(Arrays.asList(testData.existingNode, testData.existingWay), "existing",
                 "newKey").executeCommand());
@@ -80,5 +80,5 @@
      */
     @Test
-    public void testChangeKeyIgnored() {
+    void testChangeKeyIgnored() {
         Node node1 = testData.createNode(15);
         node1.removeAll();
@@ -109,5 +109,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         Node node1 = testData.createNode(15);
         node1.put("name", "xy");
@@ -123,5 +123,5 @@
      */
     @Test
-    public void testChildren() {
+    void testChildren() {
         Node node1 = testData.createNode(15);
         Node node2 = testData.createNode(16);
@@ -149,5 +149,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ChangePropertyKeyCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java	(revision 17275)
@@ -2,15 +2,15 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-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.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -29,10 +29,10 @@
  * Unit tests of {@link ChangeRelationMemberRoleCommand} class.
  */
-public class ChangeRelationMemberRoleCommandTest {
+class ChangeRelationMemberRoleCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -42,5 +42,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestDataWithRelation();
@@ -51,5 +51,5 @@
      */
     @Test
-    public void testRoleChanged() {
+    void testRoleChanged() {
         assertTrue(new ChangeRelationMemberRoleCommand(testData.existingRelation, 0, "newRole").executeCommand());
         assertEquals("newRole", testData.existingRelation.getMember(0).getRole());
@@ -67,5 +67,5 @@
      */
     @Test
-    public void testWrongIndex() {
+    void testWrongIndex() {
         // should be ignored
         ChangeRelationMemberRoleCommand command1 = new ChangeRelationMemberRoleCommand(testData.existingRelation, -1, "newRole");
@@ -85,5 +85,5 @@
      */
     @Test
-    public void testSameRole() {
+    void testSameRole() {
         // should be ignored
         assertTrue(new ChangeRelationMemberRoleCommand(testData.existingRelation, 0, "node").executeCommand());
@@ -95,5 +95,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         ChangeRelationMemberRoleCommand command = new ChangeRelationMemberRoleCommand(testData.existingRelation, 0, "newRole");
         command.executeCommand();
@@ -114,5 +114,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -128,5 +128,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         testData.existingRelation.put("name", "xy");
         assertTrue(new ChangeRelationMemberRoleCommand(testData.existingRelation, 0, "newRole").getDescriptionText()
@@ -138,5 +138,5 @@
      */
     @Test
-    public void testChildren() {
+    void testChildren() {
         assertNull(new ChangeRelationMemberRoleCommand(testData.existingRelation, 0, "newRole").getChildren());
     }
@@ -146,5 +146,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ChangeRelationMemberRoleCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/CommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/CommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/CommandTest.java	(revision 17275)
@@ -4,6 +4,6 @@
 import java.util.Arrays;
 
-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.coor.LatLon;
@@ -30,5 +30,5 @@
      * We need prefs for nodes / data sets.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -38,5 +38,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(Command.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java	(revision 17275)
@@ -2,8 +2,9 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-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.assertArrayEquals;
+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 static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
@@ -13,7 +14,7 @@
 import java.util.NoSuchElementException;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -35,10 +36,10 @@
  * Unit tests of {@link DeleteCommand} class.
  */
-public class DeleteCommandTest {
+class DeleteCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
@@ -48,5 +49,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestDataWithRelation();
@@ -57,5 +58,5 @@
      */
     @Test
-    public void testSimpleDelete() {
+    void testSimpleDelete() {
         Node node = testData.createNode(15);
         assertTrue(testData.layer.data.allPrimitives().contains(node));
@@ -72,5 +73,5 @@
      */
     @Test
-    public void testDeleteIgnoresReferences() {
+    void testDeleteIgnoresReferences() {
         assertTrue(testData.existingNode.getReferrers().contains(testData.existingRelation));
         new DeleteCommand(testData.existingRelation).executeCommand();
@@ -92,9 +93,9 @@
      * A delete should delete all objects with references to the deleted one
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testDeleteFailsOnDelted() {
+    @Test
+    void testDeleteFailsOnDeleted() {
         new DeleteCommand(testData.existingRelation).executeCommand();
 
-        new DeleteCommand(testData.existingRelation).executeCommand();
+        assertThrows(IllegalArgumentException.class, () -> new DeleteCommand(testData.existingRelation).executeCommand());
     }
 
@@ -103,5 +104,5 @@
      */
     @Test
-    public void testReferredDelete() {
+    void testReferredDelete() {
         DeleteCommand.deleteWithReferences(Arrays.asList(testData.existingNode), true).executeCommand();
 
@@ -115,5 +116,5 @@
      */
     @Test
-    public void testDeleteNodesInWay() {
+    void testDeleteNodesInWay() {
         testData.existingNode.removeAll();
         // That untagged node should be deleted.
@@ -152,7 +153,7 @@
      * Test that {@link DeleteCommand} checks for non-null.
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testConsistency() {
-        new DeleteCommand(Arrays.asList(testData.existingNode, testData.existingWay, null));
+    @Test
+    void testConsistency() {
+        assertThrows(IllegalArgumentException.class, () -> new DeleteCommand(Arrays.asList(testData.existingNode, testData.existingWay, null)));
     }
 
@@ -160,8 +161,8 @@
      * Test that {@link DeleteCommand} checks for the dataset
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testConsistencyDataset() {
+    @Test
+    void testConsistencyDataset() {
         testData.layer.getDataSet().removePrimitive(testData.existingNode);
-        new DeleteCommand(Arrays.asList(testData.existingNode, testData.existingWay));
+        assertThrows(IllegalArgumentException.class, () -> new DeleteCommand(Arrays.asList(testData.existingNode, testData.existingWay)));
     }
 
@@ -169,7 +170,7 @@
      * Test that {@link DeleteCommand} checks for non-empty list
      */
-    @Test(expected = NoSuchElementException.class)
-    public void testConsistencyNonEmpty() {
-        new DeleteCommand(Arrays.<OsmPrimitive>asList());
+    @Test
+    void testConsistencyNonEmpty() {
+        assertThrows(NoSuchElementException.class, () -> new DeleteCommand(Arrays.<OsmPrimitive>asList()));
     }
 
@@ -177,7 +178,7 @@
      * Test that {@link DeleteCommand} checks for non-null list
      */
-    @Test(expected = NullPointerException.class)
-    public void testConsistencyNonNull() {
-        new DeleteCommand((Collection<OsmPrimitive>) null);
+    @Test
+    void testConsistencyNonNull() {
+        assertThrows(NullPointerException.class, () -> new DeleteCommand((Collection<OsmPrimitive>) null));
     }
 
@@ -186,5 +187,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         DeleteCommand command = new DeleteCommand(
                 Arrays.asList(testData.existingNode, testData.existingNode2, testData.existingWay));
@@ -211,5 +212,5 @@
      */
     @Test
-    public void testDeleteWaySegment() {
+    void testDeleteWaySegment() {
         Way way1 = testData.createWay(100, testData.createNode(101), testData.createNode(102));
         WaySegment ws = new WaySegment(way1, 0);
@@ -225,5 +226,5 @@
      */
     @Test
-    public void testDeleteWaySegmentEndOfWay() {
+    void testDeleteWaySegmentEndOfWay() {
         Way way = testData.createWay(200, testData.createNode(201), testData.createNode(202), testData.createNode(203),
                 testData.createNode(204));
@@ -243,5 +244,5 @@
      */
     @Test
-    public void testDeleteWaySegmentStartOfWay() {
+    void testDeleteWaySegmentStartOfWay() {
         Way way = testData.createWay(100, testData.createNode(101), testData.createNode(102), testData.createNode(103),
                 testData.createNode(104));
@@ -261,5 +262,5 @@
      */
     @Test
-    public void testDeleteWaySegmentSplit() {
+    void testDeleteWaySegmentSplit() {
         Node node103 = testData.createNode(103);
         Node node104 = testData.createNode(104);
@@ -285,5 +286,5 @@
      */
     @Test
-    public void testDeleteWaySegmentCycle() {
+    void testDeleteWaySegmentCycle() {
         Node n = testData.createNode(101);
         Way way = testData.createWay(100, n, testData.createNode(102), testData.createNode(103),
@@ -304,5 +305,5 @@
      */
     @Test
-    public void testGetChildren() {
+    void testGetChildren() {
         testData.existingNode.put("name", "xy");
         Collection<PseudoCommand> children = new DeleteCommand(Arrays.<OsmPrimitive>asList(testData.existingNode, testData.existingNode2))
@@ -319,5 +320,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -334,5 +335,5 @@
      */
     @Test
-    public void testGetParticipatingPrimitives() {
+    void testGetParticipatingPrimitives() {
         DeleteCommand command = new DeleteCommand(Arrays.<OsmPrimitive>asList(testData.existingNode));
         assertArrayEquals(new Object[] {testData.existingNode }, command.getParticipatingPrimitives().toArray());
@@ -348,5 +349,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         Node node = testData.createNode(100);
         node.put("name", "xy");
@@ -378,5 +379,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(DeleteCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/MoveCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/MoveCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/MoveCommandTest.java	(revision 17275)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
@@ -12,7 +12,7 @@
 import java.util.Set;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -34,9 +34,9 @@
  * Unit tests of {@link MoveCommand} class.
  */
-public class MoveCommandTest {
+class MoveCommandTest {
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().i18n().projection();
@@ -46,5 +46,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestDataWithRelation();
@@ -55,5 +55,5 @@
      */
     @Test
-    public void testConstructors() {
+    void testConstructors() {
         EastNorth offset = new EastNorth(1, 2);
         LatLon destLatLon = ProjectionRegistry.getProjection().eastNorth2latlon(offset);
@@ -75,7 +75,7 @@
         assertEquals(nodes, new ArrayList<>(Collections.<OsmPrimitive>singleton(testData.existingNode)));
 
-        assertEquals("east", 1, moveCommand.getOffset().east(), 0.0001);
-        assertEquals("north", 2, moveCommand.getOffset().north(), 0.0001);
-        assertEquals("distance", 2.236068, moveCommand.getDistance(n -> true), 0.0001);
+        assertEquals(1, moveCommand.getOffset().east(), 0.0001, "east");
+        assertEquals(2, moveCommand.getOffset().north(), 0.0001, "north");
+        assertEquals(2.236068, moveCommand.getDistance(n -> true), 0.0001, "distance");
     }
 
@@ -84,11 +84,11 @@
      */
     @Test
-    public void testSingleMove() {
+    void testSingleMove() {
         MoveCommand command = new MoveCommand(testData.existingNode, 1, 2);
         testData.existingNode.setEastNorth(new EastNorth(3, 7));
         command.executeCommand();
-        assertEquals("east", 4, testData.existingNode.getEastNorth().east(), 0.0001);
-        assertEquals("north", 9, testData.existingNode.getEastNorth().north(), 0.0001);
-        assertEquals("distance", 2.236068, command.getDistance(n -> true), 0.0001);
+        assertEquals(4, testData.existingNode.getEastNorth().east(), 0.0001, "east");
+        assertEquals(9, testData.existingNode.getEastNorth().north(), 0.0001, "north");
+        assertEquals(2.236068, command.getDistance(n -> true), 0.0001, "distance");
     }
 
@@ -97,5 +97,5 @@
      */
     @Test
-    public void testMultipleMove() {
+    void testMultipleMove() {
         MoveCommand command = new MoveCommand(
                 Arrays.asList(testData.existingNode, testData.existingNode2, testData.existingWay),
@@ -106,8 +106,8 @@
         command.executeCommand();
 
-        assertEquals("east", 4, testData.existingNode.getEastNorth().east(), 0.0001);
-        assertEquals("north", 9, testData.existingNode.getEastNorth().north(), 0.0001);
-        assertEquals("east", 5, testData.existingNode2.getEastNorth().east(), 0.0001);
-        assertEquals("north", 9, testData.existingNode2.getEastNorth().north(), 0.0001);
+        assertEquals(4, testData.existingNode.getEastNorth().east(), 0.0001, "east");
+        assertEquals(9, testData.existingNode.getEastNorth().north(), 0.0001, "north");
+        assertEquals(5, testData.existingNode2.getEastNorth().east(), 0.0001, "east");
+        assertEquals(9, testData.existingNode2.getEastNorth().north(), 0.0001, "north");
     }
 
@@ -116,20 +116,20 @@
      */
     @Test
-    public void testMoveAgain() {
+    void testMoveAgain() {
         MoveCommand command = new MoveCommand(testData.existingNode, 1, 2);
-        assertEquals("east", 1, command.getOffset().east(), 0.0001);
-        assertEquals("north", 2, command.getOffset().north(), 0.0001);
+        assertEquals(1, command.getOffset().east(), 0.0001, "east");
+        assertEquals(2, command.getOffset().north(), 0.0001, "north");
 
         command.moveAgain(1, 2);
-        assertEquals("east", 2, command.getOffset().east(), 0.0001);
-        assertEquals("north", 4, command.getOffset().north(), 0.0001);
+        assertEquals(2, command.getOffset().east(), 0.0001, "east");
+        assertEquals(4, command.getOffset().north(), 0.0001, "north");
 
         command.moveAgain(-9, -3);
-        assertEquals("east", -7, command.getOffset().east(), 0.0001);
-        assertEquals("north", 1, command.getOffset().north(), 0.0001);
+        assertEquals(-7, command.getOffset().east(), 0.0001, "east");
+        assertEquals(1, command.getOffset().north(), 0.0001, "north");
 
         command.moveAgainTo(1, 2);
-        assertEquals("east", 1, command.getOffset().east(), 0.0001);
-        assertEquals("north", 2, command.getOffset().north(), 0.0001);
+        assertEquals(1, command.getOffset().east(), 0.0001, "east");
+        assertEquals(2, command.getOffset().north(), 0.0001, "north");
     }
 
@@ -138,17 +138,17 @@
      */
     @Test
-    public void testCheckpoint() {
+    void testCheckpoint() {
         MoveCommand command = new MoveCommand(testData.existingNode, 2, 4);
-        assertEquals("east", 2, command.getOffset().east(), 0.0001);
-        assertEquals("north", 4, command.getOffset().north(), 0.0001);
+        assertEquals(2, command.getOffset().east(), 0.0001, "east");
+        assertEquals(4, command.getOffset().north(), 0.0001, "north");
 
         command.saveCheckpoint();
         command.moveAgain(3, 7);
-        assertEquals("east", 5, command.getOffset().east(), 0.0001);
-        assertEquals("north", 11, command.getOffset().north(), 0.0001);
+        assertEquals(5, command.getOffset().east(), 0.0001, "east");
+        assertEquals(11, command.getOffset().north(), 0.0001, "north");
 
         command.resetToCheckpoint();
-        assertEquals("east", 2, command.getOffset().east(), 0.0001);
-        assertEquals("north", 4, command.getOffset().north(), 0.0001);
+        assertEquals(2, command.getOffset().east(), 0.0001, "east");
+        assertEquals(4, command.getOffset().north(), 0.0001, "north");
     }
 
@@ -157,19 +157,19 @@
      */
     @Test
-    public void testStartPoint() {
+    void testStartPoint() {
         EastNorth start = new EastNorth(10, 20);
         MoveCommand command = new MoveCommand(testData.existingNode, start, start.add(1, 2));
-        assertEquals("east", 1, command.getOffset().east(), 0.0001);
-        assertEquals("north", 2, command.getOffset().north(), 0.0001);
+        assertEquals(1, command.getOffset().east(), 0.0001, "east");
+        assertEquals(2, command.getOffset().north(), 0.0001, "north");
 
         command.applyVectorTo(start.add(3, 4));
-        assertEquals("east", 3, command.getOffset().east(), 0.0001);
-        assertEquals("north", 4, command.getOffset().north(), 0.0001);
+        assertEquals(3, command.getOffset().east(), 0.0001, "east");
+        assertEquals(4, command.getOffset().north(), 0.0001, "north");
 
         // set to 100, 200
         command.changeStartPoint(new EastNorth(103, 204));
         command.applyVectorTo(new EastNorth(101, 202));
-        assertEquals("east", 1, command.getOffset().east(), 0.0001);
-        assertEquals("north", 2, command.getOffset().north(), 0.0001);
+        assertEquals(1, command.getOffset().east(), 0.0001, "east");
+        assertEquals(2, command.getOffset().north(), 0.0001, "north");
     }
 
@@ -178,10 +178,10 @@
      */
     @Test
-    public void testNoStartPoint() {
+    void testNoStartPoint() {
         MoveCommand command = new MoveCommand(testData.existingNode, 1, 0);
         // ignored
         command.applyVectorTo(new EastNorth(3, 4));
-        assertEquals("east", 1, command.getOffset().east(), 0.0001);
-        assertEquals("north", 0, command.getOffset().north(), 0.0001);
+        assertEquals(1, command.getOffset().east(), 0.0001, "east");
+        assertEquals(0, command.getOffset().north(), 0.0001, "north");
 
         // set to 100, 200
@@ -189,6 +189,6 @@
         // works
         command.applyVectorTo(new EastNorth(101, 202));
-        assertEquals("east", 1, command.getOffset().east(), 0.0001);
-        assertEquals("north", 2, command.getOffset().north(), 0.0001);
+        assertEquals(1, command.getOffset().east(), 0.0001, "east");
+        assertEquals(2, command.getOffset().north(), 0.0001, "north");
     }
 
@@ -197,18 +197,18 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         testData.existingNode.setEastNorth(new EastNorth(3, 7));
         MoveCommand command = new MoveCommand(testData.existingNode, 1, 2);
         command.executeCommand();
-        assertEquals("east", 4, testData.existingNode.getEastNorth().east(), 0.0001);
-        assertEquals("north", 9, testData.existingNode.getEastNorth().north(), 0.0001);
+        assertEquals(4, testData.existingNode.getEastNorth().east(), 0.0001, "east");
+        assertEquals(9, testData.existingNode.getEastNorth().north(), 0.0001, "north");
 
         command.undoCommand();
-        assertEquals("east", 3, testData.existingNode.getEastNorth().east(), 0.0001);
-        assertEquals("north", 7, testData.existingNode.getEastNorth().north(), 0.0001);
-
-        command.executeCommand();
-        assertEquals("east", 4, testData.existingNode.getEastNorth().east(), 0.0001);
-        assertEquals("north", 9, testData.existingNode.getEastNorth().north(), 0.0001);
+        assertEquals(3, testData.existingNode.getEastNorth().east(), 0.0001, "east");
+        assertEquals(7, testData.existingNode.getEastNorth().north(), 0.0001, "north");
+
+        command.executeCommand();
+        assertEquals(4, testData.existingNode.getEastNorth().east(), 0.0001, "east");
+        assertEquals(9, testData.existingNode.getEastNorth().north(), 0.0001, "north");
     }
 
@@ -217,5 +217,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -232,5 +232,5 @@
      */
     @Test
-    public void testGetParticipatingPrimitives() {
+    void testGetParticipatingPrimitives() {
         MoveCommand command = new MoveCommand(Arrays.<OsmPrimitive>asList(testData.existingNode), 1, 2);
         command.executeCommand();
@@ -248,5 +248,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         Node node = TestUtils.addFakeDataSet(new Node(LatLon.ZERO));
         node.put("name", "xy");
@@ -261,5 +261,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(MoveCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java	(revision 17275)
@@ -2,10 +2,10 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+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.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
@@ -13,7 +13,7 @@
 import java.util.List;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -37,9 +37,9 @@
  * Unit tests of {@link PurgeCommand} class.
  */
-public class PurgeCommandTest {
+class PurgeCommandTest {
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -49,5 +49,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestDataWithRelation();
@@ -58,5 +58,5 @@
      */
     @Test
-    public void testExecute() {
+    void testExecute() {
         Relation relationParent = testData.createRelation(100, new RelationMember("child", testData.existingRelation));
         Relation relationParent2 = testData.createRelation(101, new RelationMember("child", testData.existingRelation));
@@ -83,5 +83,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         PurgeCommand command = new PurgeCommand(testData.layer.getDataSet(),
                 Arrays.<OsmPrimitive>asList(testData.existingNode, testData.existingWay),
@@ -104,5 +104,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -121,5 +121,5 @@
      */
     @Test
-    public void testGetParticipatingPrimitives() {
+    void testGetParticipatingPrimitives() {
         PurgeCommand command = new PurgeCommand(testData.layer.getDataSet(), Arrays.<OsmPrimitive>asList(testData.existingNode),
                 Arrays.<OsmPrimitive>asList(testData.existingRelation));
@@ -131,5 +131,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         List<OsmPrimitive> shortList = Arrays.<OsmPrimitive>asList(testData.existingWay);
         assertTrue(new PurgeCommand(testData.layer.getDataSet(), shortList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
@@ -145,5 +145,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(PurgeCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java	(revision 17275)
@@ -2,14 +2,14 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 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.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -28,10 +28,10 @@
  * Unit tests of {@link RemoveNodesCommand} class.
  */
-public class RemoveNodesCommandTest {
+class RemoveNodesCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -41,5 +41,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestDataWithRelation();
@@ -50,5 +50,5 @@
      */
     @Test
-    public void testExecute() {
+    void testExecute() {
         RemoveNodesCommand command = new RemoveNodesCommand(testData.existingWay,
                 Collections.singleton(testData.existingNode));
@@ -65,5 +65,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         RemoveNodesCommand command = new RemoveNodesCommand(testData.existingWay,
                 Collections.singleton(testData.existingNode));
@@ -87,5 +87,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -103,5 +103,5 @@
      */
     @Test
-    public void testGetParticipatingPrimitives() {
+    void testGetParticipatingPrimitives() {
         RemoveNodesCommand command = new RemoveNodesCommand(testData.existingWay,
                 Collections.singleton(testData.existingNode));
@@ -114,5 +114,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         assertTrue(new RemoveNodesCommand(testData.existingWay, Collections.singleton(testData.existingNode))
                 .getDescriptionText().matches("Removed nodes from .*"));
@@ -123,5 +123,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(RemoveNodesCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/RotateCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/RotateCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/RotateCommandTest.java	(revision 17275)
@@ -2,13 +2,13 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -29,10 +29,10 @@
  * Unit tests of {@link RotateCommand} class.
  */
-public class RotateCommandTest {
+class RotateCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().projection();
@@ -42,5 +42,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestData();
@@ -51,5 +51,5 @@
      */
     @Test
-    public void testRotate() {
+    void testRotate() {
         // pivot needs to be at 0,0
         Node n1 = new Node(new EastNorth(10, 10));
@@ -71,5 +71,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         Node n1 = new Node(new EastNorth(10, 10));
         Node n2 = new Node(new EastNorth(-1, 0));
@@ -96,5 +96,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -113,5 +113,5 @@
      */
     @Test
-    public void testGetParticipatingPrimitives() {
+    void testGetParticipatingPrimitives() {
         RotateCommand command = new RotateCommand(Arrays.asList(testData.existingNode), new EastNorth(0, 0));
         command.executeCommand();
@@ -123,5 +123,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         assertEquals("Rotate 1 node",
                 new RotateCommand(Arrays.asList(testData.existingNode), new EastNorth(0, 0))
@@ -136,5 +136,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(RotateCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java	(revision 17275)
@@ -2,13 +2,13 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -29,10 +29,10 @@
  * Unit tests of {@link ScaleCommand} class.
  */
-public class ScaleCommandTest {
+class ScaleCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().projection();
@@ -42,5 +42,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestData();
@@ -51,5 +51,5 @@
      */
     @Test
-    public void testScale() {
+    void testScale() {
         // pivot needs to be at 0,0
         Node n1 = new Node(new EastNorth(10, 10));
@@ -71,5 +71,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         Node n1 = new Node(new EastNorth(10, 10));
         Node n2 = new Node(new EastNorth(-1, 0));
@@ -96,5 +96,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -113,5 +113,5 @@
      */
     @Test
-    public void testGetParticipatingPrimitives() {
+    void testGetParticipatingPrimitives() {
         ScaleCommand command = new ScaleCommand(Arrays.asList(testData.existingNode), new EastNorth(0, 0));
         command.executeCommand();
@@ -123,5 +123,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         assertEquals("Scale 1 node",
                 new ScaleCommand(Arrays.asList(testData.existingNode), new EastNorth(0, 0))
@@ -136,5 +136,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ScaleCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java	(revision 17275)
@@ -2,7 +2,8 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
@@ -10,7 +11,7 @@
 import java.util.List;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -28,10 +29,10 @@
  * Unit tests of {@link SelectCommand} class.
  */
-public class SelectCommandTest {
+class SelectCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -41,5 +42,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestDataWithRelation();
@@ -50,5 +51,5 @@
      */
     @Test
-    public void testExecute() {
+    void testExecute() {
         SelectCommand command = new SelectCommand(testData.layer.getDataSet(), Arrays.asList(testData.existingNode, testData.existingWay));
 
@@ -66,5 +67,5 @@
      */
     @Test
-    public void testExecuteAfterModify() {
+    void testExecuteAfterModify() {
         List<OsmPrimitive> list = new ArrayList<>(Arrays.asList(testData.existingNode, testData.existingWay));
         SelectCommand command = new SelectCommand(testData.layer.getDataSet(), list);
@@ -84,5 +85,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         SelectCommand command = new SelectCommand(testData.layer.getDataSet(), Arrays.asList(testData.existingNode, testData.existingWay));
         testData.layer.getDataSet().setSelected(Arrays.asList(testData.existingNode2));
@@ -107,5 +108,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         ArrayList<OsmPrimitive> modified = new ArrayList<>();
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
@@ -123,5 +124,5 @@
      */
     @Test
-    public void testGetParticipatingPrimitives() {
+    void testGetParticipatingPrimitives() {
         SelectCommand command = new SelectCommand(testData.layer.getDataSet(), Arrays.asList(testData.existingNode));
         command.executeCommand();
@@ -133,5 +134,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         DataSet ds = testData.layer.getDataSet();
         assertTrue(new SelectCommand(ds, Arrays.<OsmPrimitive>asList(testData.existingNode))
@@ -149,5 +150,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(SelectCommand.class).usingGetClass()
@@ -165,7 +166,7 @@
      * Unit test of {@link SelectCommand#SelectCommand}.
      */
-    @Test(expected = IllegalArgumentException.class)
-    public void testConstructorIAE() {
-        new SelectCommand(new DataSet(), Arrays.asList(new OsmPrimitive[] {null}));
+    @Test
+    void testConstructorIAE() {
+        assertThrows(IllegalArgumentException.class, () -> new SelectCommand(new DataSet(), Arrays.asList(new OsmPrimitive[] {null})));
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java	(revision 17275)
@@ -2,13 +2,13 @@
 package org.openstreetmap.josm.command;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+import static org.junit.jupiter.api.Assertions.assertNull;
+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 static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.PrintWriter;
@@ -19,7 +19,7 @@
 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.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -39,10 +39,10 @@
  * Unit tests of {@link SequenceCommand} class.
  */
-public class SequenceCommandTest {
+class SequenceCommandTest {
 
     /**
      * We need prefs for nodes.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences();
@@ -52,5 +52,5 @@
      * Set up the test data.
      */
-    @Before
+    @BeforeEach
     public void createTestData() {
         testData = new CommandTestDataWithRelation();
@@ -61,5 +61,5 @@
      */
     @Test
-    public void testExecute() {
+    void testExecute() {
         DataSet ds = new DataSet();
         final TestCommand command1 = new TestCommand(ds, Arrays.<OsmPrimitive>asList(testData.existingNode));
@@ -83,5 +83,5 @@
      */
     @Test
-    public void testUndo() {
+    void testUndo() {
         DataSet ds = new DataSet();
         final TestCommand command2 = new TestCommand(ds, Arrays.<OsmPrimitive>asList(testData.existingNode2));
@@ -112,5 +112,5 @@
      */
     @Test
-    public void testExecuteRollback() {
+    void testExecuteRollback() {
         DataSet ds = new DataSet();
         TestCommand command1 = new TestCommand(ds, null);
@@ -129,5 +129,5 @@
      */
     @Test
-    public void testContinueOnErrors() {
+    void testContinueOnErrors() {
         DataSet ds = new DataSet();
         TestCommand command1 = new TestCommand(ds, null);
@@ -148,5 +148,5 @@
      */
     @Test
-    public void testGetLastCommand() {
+    void testGetLastCommand() {
         DataSet ds = new DataSet();
         final TestCommand command1 = new TestCommand(ds, Arrays.<OsmPrimitive>asList(testData.existingNode));
@@ -161,5 +161,5 @@
      */
     @Test
-    public void testFillModifiedData() {
+    void testFillModifiedData() {
         DataSet ds = new DataSet();
         Command command1 = new TestCommand(ds, Arrays.<OsmPrimitive>asList(testData.existingNode));
@@ -194,5 +194,5 @@
      */
     @Test
-    public void testGetParticipatingPrimitives() {
+    void testGetParticipatingPrimitives() {
         DataSet ds = new DataSet();
         Command command1 = new TestCommand(ds, Arrays.<OsmPrimitive>asList(testData.existingNode));
@@ -211,5 +211,5 @@
      */
     @Test
-    public void testDescription() {
+    void testDescription() {
         assertTrue(new SequenceCommand(new DataSet(), "test", Collections.emptyList(), false).getDescriptionText().matches("Sequence: test"));
     }
@@ -219,5 +219,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         DataSet ds = new DataSet();
         TestUtils.assumeWorkingEqualsVerifier();
@@ -263,5 +263,5 @@
         @Override
         public boolean executeCommand() {
-            assertFalse("Cannot execute twice", executed);
+            assertFalse(executed, "Cannot execute twice");
             executed = true;
             return true;
@@ -270,5 +270,5 @@
         @Override
         public void undoCommand() {
-            assertTrue("Cannot undo without execute", executed);
+            assertTrue(executed, "Cannot undo without execute");
             executed = false;
         }
@@ -295,5 +295,5 @@
         @Override
         public void undoCommand() {
-            assertTrue("Cannot undo without execute", executed);
+            assertTrue(executed, "Cannot undo without execute");
             executed = false;
         }
@@ -309,5 +309,5 @@
      */
     @Test
-    public void testWrapIfNeeded() {
+    void testWrapIfNeeded() {
         DataSet ds = new DataSet();
         TestCommand command1 = new TestCommand(ds, Collections.<OsmPrimitive>singletonList(testData.existingNode));
@@ -322,5 +322,5 @@
      */
     @Test
-    public void testCreateReportedException() {
+    void testCreateReportedException() {
         DataSet ds = new DataSet();
         Command c1 = new TestCommand(ds, Collections.emptyList()) {
Index: trunk/test/unit/org/openstreetmap/josm/command/SplitWayCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/SplitWayCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/SplitWayCommandTest.java	(revision 17275)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.command;
 
-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.io.IOException;
@@ -14,6 +14,6 @@
 import java.util.Optional;
 
-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.command.SplitWayCommand.Strategy;
@@ -36,10 +36,10 @@
  * Unit tests for class {@link SplitWayCommand}.
  */
-public final class SplitWayCommandTest {
+final class SplitWayCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().main().projection().preferences();
@@ -49,5 +49,5 @@
      */
     @Test
-    public void testFindVias() {
+    void testFindVias() {
         // empty relation
         assertTrue(SplitWayCommand.findVias(new Relation(), null).isEmpty());
@@ -81,5 +81,5 @@
      */
     @Test
-    public void testRouteRelation() {
+    void testRouteRelation() {
         doTestRouteRelation(false, 0);
         doTestRouteRelation(false, 1);
@@ -149,5 +149,5 @@
 
     @Test
-    public void testOneMemberOrderedRelationShowsWarningTest() {
+    void testOneMemberOrderedRelationShowsWarningTest() {
         final DataSet dataSet = new DataSet();
 
@@ -188,5 +188,5 @@
 
     @Test
-    public void testDoIncompleteMembersOrderedRelationCorrectOrderTest() {
+    void testDoIncompleteMembersOrderedRelationCorrectOrderTest() {
         for (int i = 0; i < 2; i++) {
             // All these permutations should result in a split that keeps the new parts in order.
@@ -244,5 +244,6 @@
 
     static void assertFirstLastNodeIs(Way way, Node node) {
-        assertTrue("First/last node of " + way + " should be " + node, node.equals(way.firstNode()) || node.equals(way.lastNode()));
+        assertTrue(node.equals(way.firstNode()) || node.equals(way.lastNode()),
+                "First/last node of " + way + " should be " + node);
     }
 
@@ -253,6 +254,6 @@
         Node last2 = two.lastNode();
 
-        assertTrue("Ways expected to be connected at their ends.",
-                first1 == first2 || first1 == last2 || last1 == first2 || last1 == last2);
+        assertTrue(first1 == first2 || first1 == last2 || last1 == first2 || last1 == last2,
+                "Ways expected to be connected at their ends.");
     }
 
@@ -263,5 +264,5 @@
      */
     @Test
-    public void testTicket18596() throws IOException, IllegalDataException {
+    void testTicket18596() throws IOException, IllegalDataException {
         try (InputStream is = TestUtils.getRegressionDataStream(18596, "data.osm")) {
             DataSet ds = OsmReader.parseDataSet(is, null);
@@ -280,5 +281,5 @@
             Relation relation = (Relation) ds.getPrimitiveById(8888, OsmPrimitiveType.RELATION);
 
-            assertEquals(relation.getMembersCount(), 8);
+            assertEquals(8, relation.getMembersCount());
 
             // Before the patch introduced in #18596, these asserts would fail. The two parts of
@@ -299,5 +300,5 @@
      */
     @Test
-    public void testTicket17400() throws IOException, IllegalDataException {
+    void testTicket17400() throws IOException, IllegalDataException {
         try (InputStream is = TestUtils.getRegressionDataStream(17400, "data.osm")) {
             DataSet ds = OsmReader.parseDataSet(is, null);
@@ -323,5 +324,5 @@
 
             // One more than the original 161.
-            assertEquals(relation.getMembersCount(), 162);
+            assertEquals(162, relation.getMembersCount());
 
             // Before the patch introduced in #18596, these asserts would fail. The new parts of
@@ -347,5 +348,5 @@
      */
     @Test
-    public void testTicket18863() throws IOException, IllegalDataException {
+    void testTicket18863() throws IOException, IllegalDataException {
         try (InputStream is = TestUtils.getRegressionDataStream(18863, "data.osm.bz2")) {
             DataSet ds = OsmReader.parseDataSet(is, null);
@@ -375,5 +376,5 @@
      */
     @Test
-    public void testTicket19432() throws IOException, IllegalDataException {
+    void testTicket19432() throws IOException, IllegalDataException {
         try (InputStream is = TestUtils.getRegressionDataStream(19432, "josm_split_way_exception_example.osm.bz2")) {
             DataSet ds = OsmReader.parseDataSet(is, null);
Index: trunk/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.command;
 
-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.coor.LatLon;
@@ -18,10 +18,10 @@
  * Unit tests of {@link TransformNodesCommand} class.
  */
-public class TransformNodesCommandTest {
+class TransformNodesCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -31,5 +31,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(TransformNodesCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java	(revision 17275)
@@ -2,11 +2,11 @@
 package org.openstreetmap.josm.command.conflict;
 
-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.assertTrue;
 
-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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -26,10 +26,10 @@
  * Unit tests of {@link ConflictAddCommand} class.
  */
-public class ConflictAddCommandTest {
+class ConflictAddCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -39,5 +39,5 @@
      * Setup test.
      */
-    @Before
+    @BeforeEach
     public void setUp() {
         testData = new CommandTestData();
@@ -48,5 +48,5 @@
      */
     @Test
-    public void testExecuteUndoCommand() {
+    void testExecuteUndoCommand() {
         DataSet ds = testData.layer.getDataSet();
         Conflict<Node> conflict = new Conflict<>(testData.existingNode, testData.existingNode2);
@@ -64,5 +64,5 @@
      */
     @Test
-    public void testGetDescriptionIcon() {
+    void testGetDescriptionIcon() {
         Conflict<Node> conflict = new Conflict<>(testData.existingNode, testData.existingNode2);
         assertNotNull(new ConflictAddCommand(testData.layer.getDataSet(), conflict).getDescriptionIcon());
@@ -73,5 +73,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ConflictAddCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.command.conflict;
 
-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.conflict.Conflict;
@@ -19,10 +19,10 @@
  * Unit tests of {@link ConflictResolveCommand} class.
  */
-public class ConflictResolveCommandTest {
+class ConflictResolveCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -32,5 +32,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ConflictResolveCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java	(revision 17275)
@@ -2,11 +2,11 @@
 package org.openstreetmap.josm.command.conflict;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import 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.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -28,5 +28,5 @@
  * Unit tests of {@link CoordinateConflictResolveCommand} class.
  */
-public class CoordinateConflictResolveCommandTest {
+class CoordinateConflictResolveCommandTest {
 
     private CommandTestData testData;
@@ -35,5 +35,5 @@
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -42,5 +42,5 @@
      * Setup test.
      */
-    @Before
+    @BeforeEach
     public void setUp() {
         testData = new CommandTestData();
@@ -55,5 +55,5 @@
      */
     @Test
-    public void testExecuteKeepMineUndoCommand() {
+    void testExecuteKeepMineUndoCommand() {
         Conflict<Node> conflict = createConflict();
         CoordinateConflictResolveCommand cmd = new CoordinateConflictResolveCommand(conflict, MergeDecisionType.KEEP_MINE);
@@ -68,5 +68,5 @@
      */
     @Test
-    public void testExecuteKeepTheirUndoCommand() {
+    void testExecuteKeepTheirUndoCommand() {
         Conflict<Node> conflict = createConflict();
         CoordinateConflictResolveCommand cmd = new CoordinateConflictResolveCommand(conflict, MergeDecisionType.KEEP_THEIR);
@@ -81,5 +81,5 @@
      */
     @Test
-    public void testGetDescriptionIcon() {
+    void testGetDescriptionIcon() {
         Conflict<Node> conflict = createConflict();
         assertNotNull(new CoordinateConflictResolveCommand(conflict, null).getDescriptionIcon());
@@ -90,5 +90,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(CoordinateConflictResolveCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.command.conflict;
 
-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.conflict.Conflict;
@@ -20,10 +20,10 @@
  * Unit tests of {@link DeletedStateConflictResolveCommand} class.
  */
-public class DeletedStateConflictResolveCommandTest {
+class DeletedStateConflictResolveCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -33,5 +33,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(DeletedStateConflictResolveCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.command.conflict;
 
-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.conflict.Conflict;
@@ -20,10 +20,10 @@
  * Unit tests of {@link ModifiedConflictResolveCommand} class.
  */
-public class ModifiedConflictResolveCommandTest {
+class ModifiedConflictResolveCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -33,5 +33,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(ModifiedConflictResolveCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.command.conflict;
 
-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.conflict.Conflict;
@@ -20,10 +20,10 @@
  * Unit tests of {@link RelationMemberConflictResolverCommand} class.
  */
-public class RelationMemberConflictResolverCommandTest {
+class RelationMemberConflictResolverCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -33,5 +33,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(RelationMemberConflictResolverCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.command.conflict;
 
-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.conflict.Conflict;
@@ -20,10 +20,10 @@
  * Unit tests of {@link TagConflictResolveCommand} class.
  */
-public class TagConflictResolveCommandTest {
+class TagConflictResolveCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -33,5 +33,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(TagConflictResolveCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.command.conflict;
 
-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.conflict.Conflict;
@@ -20,10 +20,10 @@
  * Unit tests of {@link VersionConflictResolveCommand} class.
  */
-public class VersionConflictResolveCommandTest {
+class VersionConflictResolveCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -33,5 +33,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(VersionConflictResolveCommand.class).usingGetClass()
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java	(revision 17240)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java	(revision 17275)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.command.conflict;
 
-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.conflict.Conflict;
@@ -20,10 +20,10 @@
  * Unit tests of {@link WayNodesConflictResolverCommand} class.
  */
-public class WayNodesConflictResolverCommandTest {
+class WayNodesConflictResolverCommandTest {
 
     /**
      * Setup test.
      */
-    @Rule
+    @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules();
@@ -33,5 +33,5 @@
      */
     @Test
-    public void testEqualsContract() {
+    void testEqualsContract() {
         TestUtils.assumeWorkingEqualsVerifier();
         EqualsVerifier.forClass(WayNodesConflictResolverCommand.class).usingGetClass()
