Index: trunk/ivy.xml
===================================================================
--- trunk/ivy.xml	(revision 18689)
+++ trunk/ivy.xml	(revision 18690)
@@ -61,10 +61,11 @@
         <dependency conf="test->default" org="com.github.tomakehurst" name="wiremock-jre8" rev="2.35.0"/>
         <dependency conf="test->default" org="io.github.classgraph" name="classgraph" rev="4.8.154"/>
-        <dependency conf="test->default" org="org.junit.platform" name="junit-platform-launcher" rev="1.9.1"/>
-        <dependency conf="test->default" org="org.junit.vintage" name="junit-vintage-engine" rev="5.9.1"/>
-        <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-params" rev="5.9.1"/>
-        <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-api" rev="5.9.1"/>
-        <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-engine" rev="5.9.1"/>
-        <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-migrationsupport" rev="5.9.1"/>
+        <dependency conf="test->default" org="org.junit.platform" name="junit-platform-launcher" rev="1.9.2"/>
+        <dependency conf="test->default" org="org.junit.platform" name="junit-platform-suite" rev="1.9.2"/>
+        <dependency conf="test->default" org="org.junit.vintage" name="junit-vintage-engine" rev="5.9.2"/>
+        <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-params" rev="5.9.2"/>
+        <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-api" rev="5.9.2"/>
+        <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-engine" rev="5.9.2"/>
+        <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-migrationsupport" rev="5.9.2"/>
         <dependency conf="test->default" org="net.trajano.commons" name="commons-testing" rev="2.1.0"/>
         <dependency conf="test->default" org="nl.jqno.equalsverifier" name="equalsverifier" rev="3.12.3"/>
Index: trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 18689)
+++ trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 18690)
@@ -16,4 +16,5 @@
 import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.security.SecureRandom;
 import java.text.MessageFormat;
@@ -52,5 +53,5 @@
  */
 @SuppressFBWarnings(value = "CRLF_INJECTION_LOGS")
-@Timeout(value = 60, unit = TimeUnit.SECONDS)
+@Timeout(value = 1, unit = TimeUnit.MINUTES)
 class MultiFetchServerObjectReaderTest {
     private static final Logger logger = Logger.getLogger(MultiFetchServerObjectReader.class.getName());
@@ -191,5 +192,5 @@
         try (
             PrintWriter pw = new PrintWriter(
-                    new OutputStreamWriter(new FileOutputStream(dataSetCacheOutputFile), StandardCharsets.UTF_8)
+                    new OutputStreamWriter(Files.newOutputStream(dataSetCacheOutputFile.toPath()), StandardCharsets.UTF_8)
         )) {
             logger.info(MessageFormat.format("caching test data set in ''{0}'' ...", dataSetCacheOutputFile.toString()));
Index: trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java	(revision 18689)
+++ trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java	(revision 18690)
@@ -240,5 +240,10 @@
     void testTooMuchRedirects() throws IOException {
         mockRedirects(false, 3);
-        assertThrows(IOException.class, () -> HttpClient.create(url("/relative-redirect/3")).setMaxRedirects(2).connect(progress));
+        final HttpClient client = HttpClient.create(url("/relative-redirect/3")).setMaxRedirects(2);
+        try {
+            assertThrows(IOException.class, () -> client.connect(progress));
+        } finally {
+            client.disconnect();
+        }
     }
 
@@ -370,5 +375,10 @@
     void testTakesTooLong() throws IOException {
         mockDelay(1);
-        assertThrows(IOException.class, () -> HttpClient.create(url("/delay/1")).setReadTimeout(500).connect(progress));
+        final HttpClient client = HttpClient.create(url("/delay/1")).setReadTimeout(500);
+        try {
+            assertThrows(IOException.class, () -> client.connect(progress));
+        } finally {
+            client.disconnect();
+        }
     }
 
@@ -387,5 +397,5 @@
 
     /**
-     * Test of {@link Response#uncompress} method with Gzip compression.
+     * Test of {@link Response#uncompress(boolean)} method with Gzip compression.
      * @throws IOException if any I/O error occurs
      */
@@ -407,5 +417,5 @@
 
     /**
-     * Test of {@link Response#uncompress} method with Bzip compression.
+     * Test of {@link Response#uncompress(boolean)} method with Bzip compression.
      * @throws IOException if any I/O error occurs
      */
@@ -427,5 +437,5 @@
 
     /**
-     * Test of {@link Response#uncompress} method with Bzip compression.
+     * Test of {@link Response#uncompress(boolean)} method with Bzip compression.
      * @throws IOException if any I/O error occurs
      */
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java	(revision 18689)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java	(revision 18690)
@@ -3,5 +3,5 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNotSame;
 import static org.junit.jupiter.api.Assertions.assertSame;
@@ -14,5 +14,5 @@
 
 import org.apache.commons.lang3.RandomStringUtils;
-import org.junit.Before;
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Timeout;
@@ -29,5 +29,5 @@
  * @author Michael Zangl
  */
-@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+@Timeout(value = 15, unit = TimeUnit.MINUTES)
 class KeyValuePerformanceTest {
     private static final int PUT_RUNS = 10000;
@@ -96,5 +96,5 @@
         timer = PerformanceTestUtils.startTimer("str1.equals(str2) = fails (without intern)");
         for (int i = 0; i < STRING_INTERN_TESTS; i++) {
-            assertFalse(str1.equals(str2));
+            assertNotEquals(str1, str2);
         }
         timer.done();
@@ -116,5 +116,5 @@
      * Generate an array of test strings.
      */
-    @Before
+    @BeforeEach
     public void generateTestStrings() {
         testStrings.clear();
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java	(revision 18689)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java	(revision 18690)
@@ -31,5 +31,5 @@
  * Abstract superclass of {@code StyledMapRendererPerformanceTest} and {@code WireframeMapRendererPerformanceTest}.
  */
-@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+@Timeout(value = 15, unit = TimeUnit.MINUTES)
 abstract class AbstractMapRendererPerformanceTestParent {
 
@@ -79,5 +79,5 @@
         try (InputStream fisR = Files.newInputStream(Paths.get("nodist/data/restriction.osm"));
              InputStream fisM = Files.newInputStream(Paths.get("nodist/data/multipolygon.osm"));
-             InputStream fisO = Compression.getUncompressedFileInputStream(new File("nodist/data/overpass-download.osm.bz2"));) {
+             InputStream fisO = Compression.getUncompressedFileInputStream(new File("nodist/data/overpass-download.osm.bz2"))) {
             dsRestriction = OsmReader.parseDataSet(fisR, NullProgressMonitor.INSTANCE);
             dsMultipolygon = OsmReader.parseDataSet(fisM, NullProgressMonitor.INSTANCE);
@@ -125,8 +125,8 @@
     }
 
-    @Test
     /**
      * Complex polygon (Lake Ontario) with small download area.
      */
+    @Test
     void testOverpassDownload() throws Exception {
         test(20, dsOverpass, new Bounds(43.4510496, -76.536684, 43.4643202, -76.4954853));
Index: trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java	(revision 18689)
+++ trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java	(revision 18690)
@@ -3,4 +3,6 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.awt.Color;
@@ -21,5 +23,4 @@
 import javax.imageio.ImageIO;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
@@ -125,7 +126,7 @@
         List<StyleSource> sources = MapPaintStyles.getStyles().getStyleSources();
         filterStyleIdx = sources.indexOf(filterStyle);
-        Assert.assertEquals(2, filterStyleIdx);
-
-        Assert.assertEquals(Feature.values().length, filterStyle.settings.size());
+        assertEquals(2, filterStyleIdx);
+
+        assertEquals(Feature.values().length, filterStyle.settings.size());
         for (StyleSetting set : filterStyle.settings) {
             BooleanStyleSetting bset = (BooleanStyleSetting) set;
@@ -139,5 +140,5 @@
                 }
             }
-            Assert.assertTrue(prefKey, found);
+            assertTrue(found, prefKey);
         }
 
@@ -151,5 +152,5 @@
             }
         }
-        Assert.assertNotNull(defaultStyle);
+        assertNotNull(defaultStyle);
 
         for (StyleSetting set : defaultStyle.settings) {
@@ -161,5 +162,5 @@
             }
         }
-        Assert.assertNotNull(hideIconsSetting);
+        assertNotNull(hideIconsSetting);
         hideIconsSetting.setValue(false);
         MapPaintStyleLoader.reloadStyles(defaultStyleIdx);
@@ -209,5 +210,5 @@
             if (checkScale) {
                 int lvl = Selector.GeneralSelector.scale2level(nc.getDist100Pixel());
-                Assert.assertEquals(17, lvl);
+                assertEquals(17, lvl);
             }
 
@@ -360,5 +361,5 @@
 
         public void dumpTimes() {
-            System.out.print(String.format("gen. %4d, sort %4d, draw %4d%n", getGenerateTime(), getSortTime(), getDrawTime()));
+            System.out.printf("gen. %4d, sort %4d, draw %4d%n", getGenerateTime(), getSortTime(), getDrawTime());
         }
 
Index: trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java	(revision 18689)
+++ trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java	(revision 18690)
@@ -18,5 +18,5 @@
  * @author Michael Zangl
  */
-@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+@Timeout(value = 15, unit = TimeUnit.MINUTES)
 class MapCSSStyleSourceFilterTest {
 
@@ -71,5 +71,5 @@
 
         private void addRule(String selector) {
-            sb.append(selector + " {}\n");
+            sb.append(selector).append(" {}\n");
         }
 
Index: trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java	(revision 18689)
+++ trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java	(revision 18690)
@@ -10,4 +10,5 @@
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
 import java.util.concurrent.TimeUnit;
 
@@ -27,5 +28,5 @@
  * @author Michael Zangl
  */
-@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+@Timeout(value = 15, unit = TimeUnit.MINUTES)
 class OsmReaderPerformanceTest {
     private static final int TIMES = 4;
@@ -73,5 +74,5 @@
     private InputStream loadFile(boolean decompressBeforeRead) throws IOException {
         File file = new File(PerformanceTestUtils.DATA_FILE);
-        try (InputStream is = decompressBeforeRead ? Compression.getUncompressedFileInputStream(file) : new FileInputStream(file)) {
+        try (InputStream is = decompressBeforeRead ? Compression.getUncompressedFileInputStream(file) : Files.newInputStream(file.toPath())) {
             ByteArrayOutputStream temporary = new ByteArrayOutputStream();
             byte[] readBuffer = new byte[4096];
Index: trunk/test/performance/org/openstreetmap/josm/io/OsmWriterPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/io/OsmWriterPerformanceTest.java	(revision 18689)
+++ trunk/test/performance/org/openstreetmap/josm/io/OsmWriterPerformanceTest.java	(revision 18690)
@@ -20,5 +20,5 @@
  * For this, we use the neubrandenburg-file, which is a good real world example of an OSM file.
  */
-@Timeout(value = 15*60, unit = TimeUnit.SECONDS)
+@Timeout(value = 15, unit = TimeUnit.MINUTES)
 class OsmWriterPerformanceTest {
     private static final int TIMES = 4;
Index: trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 18690)
@@ -117,5 +117,5 @@
         I18n.init();
         // initialize the platform hook, and
-        // call the really early hook before we anything else
+        // call the really early hook before anything else
         PlatformManager.getPlatform().preStartupHook();
 
@@ -150,5 +150,5 @@
 
         if (createGui) {
-            GuiHelper.runInEDTAndWaitWithException(() -> setupGUI());
+            GuiHelper.runInEDTAndWaitWithException(this::setupGUI);
         }
     }
Index: trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -111,6 +112,5 @@
         Object copied = ClipboardUtils.getClipboard().getContents(null).getTransferData(PrimitiveTransferData.DATA_FLAVOR);
         assertNotNull(copied);
-        assertTrue(copied instanceof PrimitiveTransferData);
-        PrimitiveTransferData ptd = (PrimitiveTransferData) copied;
+        PrimitiveTransferData ptd = assertInstanceOf(PrimitiveTransferData.class, copied);
         Object[] direct = ptd.getDirectlyAdded().toArray();
         assertEquals(1, direct.length);
Index: trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java	(revision 18690)
@@ -3,4 +3,5 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -199,5 +200,5 @@
             Collection<OsmPrimitive> primitives = tests.get(test);
             for (OsmPrimitive osm : primitives) {
-                assertTrue(osm instanceof Way, test + "; expected way, but got: " + osm);
+                assertInstanceOf(Way.class, osm, test + "; expected way, but got: " + osm);
             }
             new JoinAreasAction(false).join((Collection) primitives);
Index: trunk/test/unit/org/openstreetmap/josm/actions/RestorePropertyActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/RestorePropertyActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/actions/RestorePropertyActionTest.java	(revision 18690)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.actions;
 
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 
 import javax.swing.DefaultListSelectionModel;
@@ -45,5 +45,5 @@
         UndoRedoHandler.getInstance().clean();
         new RestorePropertyAction(k -> key, v -> val, () -> n, selModel).actionPerformed(null);
-        assertTrue(UndoRedoHandler.getInstance().getLastCommand() instanceof ChangePropertyCommand);
+        assertInstanceOf(ChangePropertyCommand.class, UndoRedoHandler.getInstance().getLastCommand());
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/actions/SessionSaveActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/SessionSaveActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/actions/SessionSaveActionTest.java	(revision 18690)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.actions;
 
-import static org.junit.Assert.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
Index: trunk/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java	(revision 18690)
@@ -7,5 +7,4 @@
 import java.util.Arrays;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -59,5 +58,5 @@
         w1.setNodes(Arrays.asList(w1NodesArray));
         Way w2 = new Way();
-        w2.setNodes(Arrays.asList(new Node[] {n1, n2, n3, n1, n4, n5, n1}));
+        w2.setNodes(Arrays.asList(n1, n2, n3, n1, n4, n5, n1));
         dataSet.addPrimitive(w1);
         dataSet.addPrimitive(w2);
@@ -109,5 +108,5 @@
         for (RelationMember member : restriction.getMembers()) {
             if ("from".equals(member.getRole())) {
-                Assert.assertTrue(member.getWay().containsNode(via));
+                assertTrue(member.getWay().containsNode(via));
             }
         }
Index: trunk/test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java	(revision 18690)
@@ -1,4 +1,8 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.actions.corrector;
+
+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.Collections;
@@ -7,5 +11,4 @@
 import java.util.stream.Stream;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -105,5 +108,5 @@
 
     private void assertSwitch(Tag oldTag, Tag newTag) {
-        Assert.assertEquals(newTag, ReverseWayTagCorrector.TagSwitcher.apply(oldTag));
+        assertEquals(newTag, ReverseWayTagCorrector.TagSwitcher.apply(oldTag));
     }
 
@@ -128,6 +131,6 @@
     void testSwitchingWayNodes() {
         final Map<OsmPrimitive, List<TagCorrection>> tagCorrections = getTagCorrectionsForWay("direction=forward");
-        Assert.assertEquals(1, tagCorrections.size());
-        Assert.assertEquals(Collections.singletonList(new TagCorrection("direction", "forward", "direction", "backward")),
+        assertEquals(1, tagCorrections.size());
+        assertEquals(Collections.singletonList(new TagCorrection("direction", "forward", "direction", "backward")),
                 tagCorrections.values().iterator().next());
     }
@@ -138,6 +141,6 @@
     @Test
     void testNotSwitchingWayNodes() {
-        Assert.assertEquals(0, getTagCorrectionsForWay("direction=SSW").size());
-        Assert.assertEquals(0, getTagCorrectionsForWay("direction=145").size());
+        assertEquals(0, getTagCorrectionsForWay("direction=SSW").size());
+        assertEquals(0, getTagCorrectionsForWay("direction=145").size());
     }
 
@@ -148,12 +151,12 @@
     void testIsReversible() {
         Way w0 = buildWayWithMiddleNode("highway=stop");
-        Assert.assertTrue(ReverseWayTagCorrector.isReversible(w0));
+        assertTrue(ReverseWayTagCorrector.isReversible(w0));
         Way w1 = buildWayWithMiddleNode("direction=forward");
-        Assert.assertFalse(ReverseWayTagCorrector.isReversible(w1));
-        Assert.assertEquals(3, w1.getNodesCount());
+        assertFalse(ReverseWayTagCorrector.isReversible(w1));
+        assertEquals(3, w1.getNodesCount());
         w1.getNodes().forEach(n -> n.setKeys(null));
-        Assert.assertTrue(ReverseWayTagCorrector.isReversible(w1));
+        assertTrue(ReverseWayTagCorrector.isReversible(w1));
         w1.put("oneway", "yes");
-        Assert.assertFalse(ReverseWayTagCorrector.isReversible(w1));
+        assertFalse(ReverseWayTagCorrector.isReversible(w1));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/actions/upload/FixDataHookTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/upload/FixDataHookTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/actions/upload/FixDataHookTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -99,25 +100,25 @@
         assertTrue(w2.hasKey("ford"));
 
-        assertFalse("false".equals(w3.get("oneway")));
-        assertTrue("no".equals(w3.get("oneway")));
+        assertNotEquals("false", w3.get("oneway"));
+        assertEquals("no", w3.get("oneway"));
 
-        assertFalse("0".equals(w4.get("oneway")));
-        assertTrue("no".equals(w4.get("oneway")));
+        assertNotEquals("0", w4.get("oneway"));
+        assertEquals("no", w4.get("oneway"));
 
-        assertFalse("true".equals(w5.get("oneway")));
-        assertTrue("yes".equals(w5.get("oneway")));
+        assertNotEquals("true", w5.get("oneway"));
+        assertEquals("yes", w5.get("oneway"));
 
-        assertFalse("1".equals(w6.get("oneway")));
-        assertTrue("yes".equals(w6.get("oneway")));
+        assertNotEquals("1", w6.get("oneway"));
+        assertEquals("yes", w6.get("oneway"));
 
         assertFalse(w7.hasKey("highway"));
         assertTrue(w7.hasKey("barrier"));
 
-        assertFalse("multipolygon".equals(r1.get("type")));
-        assertTrue("boundary".equals(r1.get("type")));
+        assertNotEquals("multipolygon", r1.get("type"));
+        assertEquals("boundary", r1.get("type"));
 
-        assertTrue("space_end".equals(r2.get("foo")));
-        assertTrue("space_begin".equals(r2.get("bar")));
-        assertTrue("space_both".equals(r2.get("baz")));
+        assertEquals("space_end", r2.get("foo"));
+        assertEquals("space_begin", r2.get("bar"));
+        assertEquals("space_both", r2.get("baz"));
         assertFalse(r2.hasKey(" space_begin"));
         assertFalse(r2.hasKey("space_end "));
Index: trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java	(revision 18690)
@@ -9,4 +9,5 @@
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
@@ -115,5 +116,5 @@
 
         AddPrimitivesCommand command1 = new AddPrimitivesCommand(testData, ds);
-        AddPrimitivesCommand command2 = new AddPrimitivesCommand(Arrays.<PrimitiveData>asList(data2), ds);
+        AddPrimitivesCommand command2 = new AddPrimitivesCommand(Collections.singletonList(data2), ds);
 
         assertEquals("Added 3 objects", command1.getDescriptionText());
@@ -342,6 +343,5 @@
         way.put("test", "test");
         way.setNodeIds(Arrays.asList(node1.getId(), node2.getId()));
-        List<PrimitiveData> testData = Arrays.<PrimitiveData>asList(node1, node2, way);
-        return testData;
+        return Arrays.asList(node1, node2, way);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java	(revision 18690)
@@ -69,5 +69,5 @@
 
         assertEquals("new", testData.existingNode.get("new"));
-        assertEquals(null, testData.existingNode.get("existing"));
+        assertNull(testData.existingNode.get("existing"));
         assertEquals(LatLon.NORTH_POLE, testData.existingNode.getCoor());
 
@@ -89,5 +89,6 @@
         newNode.setCoor(LatLon.NORTH_POLE);
 
-        assertThrows(DataIntegrityProblemException.class, () -> new ChangeCommand(testData.existingNode, newNode).executeCommand());
+        final ChangeCommand changeCommand = new ChangeCommand(testData.existingNode, newNode);
+        assertThrows(DataIntegrityProblemException.class, changeCommand::executeCommand);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java	(revision 18690)
@@ -116,5 +116,5 @@
     void testMatchGpxTrack1() {
         assertEquals(7, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
-        assertEquals(null, ib.getPos());
+        assertNull(ib.getPos());
         assertEquals(new CachedLatLon(47.19286847859621, 8.79732714034617), i0.getPos()); // start of track
         assertEquals(new CachedLatLon(47.196979885920882, 8.79541271366179), i1.getPos()); // exact match
@@ -133,20 +133,20 @@
         // First waypoint has no speed in matchGpxTrack(). Speed is calculated
         // and not taken from GPX track.
-        assertEquals(null, ib.getSpeed());
-        assertEquals(null, i0.getSpeed());
-        assertEquals(Double.valueOf(11.675317966018756), i1.getSpeed(), 0.000001);
-        assertEquals(Double.valueOf(24.992418392716967), i2.getSpeed(), 0.000001);
-        assertEquals(Double.valueOf(27.307968754679223), i3.getSpeed(), 0.000001);
-        assertEquals(null, ib.getElevation());
-        assertEquals(null, i0.getElevation());
-        assertEquals(Double.valueOf(489.29), i1.getElevation(), 0.000001);
-        assertEquals(Double.valueOf((490.40 + 489.75) / 2), i2.getElevation(), 0.000001);
-        assertEquals(Double.valueOf(486.368333333), i3.getElevation(), 0.000001);
+        assertNull(ib.getSpeed());
+        assertNull(i0.getSpeed());
+        assertEquals(11.675317966018756, i1.getSpeed(), 0.000001);
+        assertEquals(24.992418392716967, i2.getSpeed(), 0.000001);
+        assertEquals(27.307968754679223, i3.getSpeed(), 0.000001);
+        assertNull(ib.getElevation());
+        assertNull(i0.getElevation());
+        assertEquals(489.29, i1.getElevation(), 0.000001);
+        assertEquals((490.40 + 489.75) / 2, i2.getElevation(), 0.000001);
+        assertEquals(486.368333333, i3.getElevation(), 0.000001);
         // interpolated elevation between trackpoints with interpolated timestamps
-        assertEquals(Double.valueOf(475.393978719), i4.getElevation(), 0.000001);
-        assertEquals(null, i5.getElevation());
-        assertEquals(null, i6.getElevation());
-
-        assertEquals(null, ib.getGpsInstant());
+        assertEquals(475.393978719, i4.getElevation(), 0.000001);
+        assertNull(i5.getElevation());
+        assertNull(i6.getElevation());
+
+        assertNull(ib.getGpsInstant());
         assertEquals(DateUtils.parseInstant("2016:01:03 11:59:54"), i0.getGpsInstant()); // original time is kept
         assertEquals(DateUtils.parseInstant("2016:01:03 12:04:01"), i1.getGpsInstant());
@@ -168,6 +168,6 @@
 
         assertEquals(4, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
-        assertEquals(null, ib.getPos());
-        assertEquals(null, i0.getPos());
+        assertNull(ib.getPos());
+        assertNull(i0.getPos());
         assertEquals(new CachedLatLon(47.196979885920882, 8.79541271366179), i1.getPos());
         assertEquals(new CachedLatLon((47.197131179273129 + 47.197186248376966) / 2,
@@ -175,6 +175,6 @@
         assertEquals(new CachedLatLon(47.197319911792874, 8.792139580473304), i3.getPos());
         assertEquals(new CachedLatLon(47.197568312311816, 8.790292849679897), i4.getPos());
-        assertEquals(null, i5.getPos());
-        assertEquals(null, i6.getPos());
+        assertNull(i5.getPos());
+        assertNull(i6.getPos());
     }
 
@@ -196,5 +196,5 @@
 
         assertEquals(6, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
-        assertEquals(null, ib.getPos());
+        assertNull(ib.getPos());
         assertEquals(new CachedLatLon(47.19286847859621, 8.79732714034617), i0.getPos());
         assertEquals(new CachedLatLon(47.196979885920882, 8.79541271366179), i1.getPos());
@@ -204,5 +204,5 @@
         assertEquals(new CachedLatLon(47.197568312311816, 8.790292849679897), i4.getPos());
         assertEquals(new CachedLatLon(47.19819249585271, 8.78536943346262), i5.getPos());
-        assertEquals(null, i6.getPos());
+        assertNull(i6.getPos());
         assertEquals(new CachedLatLon(1, 2), i7.getPos());
     }
@@ -228,6 +228,6 @@
         assertEquals(new CachedLatLon(47.19985828931693, 8.77969308585768), i6.getPos()); // different values than in tests #1 and #3!
 
-        assertEquals(Double.valueOf(447.894014085), i5.getElevation(), 0.000001);
-        assertEquals(Double.valueOf(437.395070423), i6.getElevation(), 0.000001);
+        assertEquals(447.894014085, i5.getElevation(), 0.000001);
+        assertEquals(437.395070423, i6.getElevation(), 0.000001);
 
         assertEquals(new CachedLatLon(47.20126815140247, 8.77192972227931), i7.getPos());
@@ -265,6 +265,6 @@
         assertEquals(new CachedLatLon(47.19985828931693, 8.77969308585768), i6.getPos());
 
-        assertEquals(Double.valueOf(447.894014085), i5.getElevation(), 0.000001);
-        assertEquals(Double.valueOf(437.395070423), i6.getElevation(), 0.000001);
+        assertEquals(447.894014085, i5.getElevation(), 0.000001);
+        assertEquals(437.395070423, i6.getElevation(), 0.000001);
 
         assertEquals(new CachedLatLon(47.20126815140247, 8.77192972227931), i7.getPos());
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetTest.java	(revision 18690)
@@ -6,4 +6,5 @@
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 import static org.openstreetmap.josm.data.osm.Changeset.MAX_CHANGESET_TAG_LENGTH;
 
@@ -16,5 +17,4 @@
 import java.util.stream.IntStream;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
@@ -48,5 +48,5 @@
         try {
             cs.setKeys(null);
-            Assert.fail("Should have thrown an IllegalArgumentException as we gave a null argument.");
+            fail("Should have thrown an IllegalArgumentException as we gave a null argument.");
         } catch (IllegalArgumentException e) {
             Logging.trace(e);
@@ -63,5 +63,5 @@
         keys.put("test", "test");
         cs.setKeys(keys);
-        Assert.assertEquals("Both valid keys should have been put in the ChangeSet.", 2, cs.getKeys().size());
+        assertEquals(2, cs.getKeys().size(), "Both valid keys should have been put in the ChangeSet.");
 
         // Add a map with too long values => IllegalArgumentException
@@ -71,5 +71,5 @@
         try {
             cs.setKeys(keys);
-            Assert.fail("Should have thrown an IllegalArgumentException as we gave a too long value.");
+            fail("Should have thrown an IllegalArgumentException as we gave a too long value.");
         } catch (IllegalArgumentException e) {
             Logging.trace(e);
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java	(revision 18690)
@@ -1001,5 +1001,5 @@
         //-- merge it
         DataSetMerger visitor = new DataSetMerger(my, their);
-        assertThrows(DataIntegrityProblemException.class, () -> visitor.merge());
+        assertThrows(DataIntegrityProblemException.class, visitor::merge);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetTest.java	(revision 18690)
@@ -4,12 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -43,15 +44,9 @@
         final DataSet ds = new DataSet();
         // null bbox => empty list
-        Assert.assertTrue(
-            "Empty data set should produce an empty list.",
-            ds.searchRelations(null).isEmpty()
-        );
+        assertTrue(ds.searchRelations(null).isEmpty(), "Empty data set should produce an empty list.");
 
         // empty data set, any bbox => empty list
         BBox bbox = new BBox(new LatLon(-180, -90), new LatLon(180, 90));
-        Assert.assertTrue(
-            "Empty data set should produce an empty list.",
-            ds.searchRelations(bbox).isEmpty()
-        );
+        assertTrue(ds.searchRelations(bbox).isEmpty(), "Empty data set should produce an empty list.");
 
         // data set with elements in the given bbox => these elements
@@ -64,6 +59,6 @@
         bbox = new BBox(new LatLon(-1.0, -1.0), new LatLon(1.0, 1.0));
         List<Relation> result = ds.searchRelations(bbox);
-        Assert.assertEquals("We should have found only one item.", 1, result.size());
-        Assert.assertTrue("The item found is relation r.", result.contains(r));
+        assertEquals(1, result.size(), "We should have found only one item.");
+        assertTrue(result.contains(r), "The item found is relation r.");
     }
 
@@ -75,9 +70,9 @@
         final DataSet ds = new DataSet();
         // null bbox => empty list
-        Assert.assertTrue("Empty data set should produce an empty list.", ds.searchPrimitives(null).isEmpty());
+        assertTrue(ds.searchPrimitives(null).isEmpty(), "Empty data set should produce an empty list.");
 
         // empty data set, any bbox => empty list
         BBox bbox = new BBox(new LatLon(-180, -90), new LatLon(180, 90));
-        Assert.assertTrue("Empty data set should produce an empty list.", ds.searchPrimitives(bbox).isEmpty());
+        assertTrue(ds.searchPrimitives(bbox).isEmpty(), "Empty data set should produce an empty list.");
         // data set with elements in the given bbox => these elements
         Node node = new Node(LatLon.ZERO);
@@ -92,5 +87,5 @@
         bbox = new BBox(new LatLon(-1.0, -1.0), new LatLon(1.0, 1.0));
         List<OsmPrimitive> result = ds.searchPrimitives(bbox);
-        Assert.assertEquals("We should have found four items.", 4, result.size());
+        assertEquals(4, result.size(), "We should have found four items.");
     }
 
@@ -199,5 +194,5 @@
         ds.addPrimitive(n3);
 
-        assertEquals(Arrays.asList(), new ArrayList<>(ds.getSelected()));
+        assertEquals(Collections.emptyList(), new ArrayList<>(ds.getSelected()));
 
         ds.setSelected(n1.getPrimitiveId(), n2.getPrimitiveId());
@@ -205,5 +200,5 @@
 
         ds.clearSelection();
-        assertEquals(Arrays.asList(), new ArrayList<>(ds.getSelected()));
+        assertEquals(Collections.emptyList(), new ArrayList<>(ds.getSelected()));
 
         ds.addSelected(n3.getPrimitiveId());
@@ -311,10 +306,5 @@
     @Test
     void testAddDataSourceListener() {
-        DataSourceListener addListener = new DataSourceListener() {
-            @Override
-            public void dataSourceChange(DataSourceChangeEvent event) {
-                assertTrue(event instanceof DataSourceAddedEvent);
-            }
-        };
+        DataSourceListener addListener = event -> assertInstanceOf(DataSourceAddedEvent.class, event);
 
         DataSet ds = new DataSet();
@@ -329,10 +319,5 @@
     @Test
     void testRemoveDataSourceListener() {
-        DataSourceListener removeListener = new DataSourceListener() {
-            @Override
-            public void dataSourceChange(DataSourceChangeEvent event) {
-                assertTrue(event instanceof DataSourceRemovedEvent);
-            }
-        };
+        DataSourceListener removeListener = event -> assertInstanceOf(DataSourceRemovedEvent.class, event);
 
         DataSet ds = new DataSet();
@@ -356,5 +341,5 @@
         ds.addPrimitive(w);
         Relation r = new Relation();
-        r.setMembers(Arrays.asList(new RelationMember(null, w)));
+        r.setMembers(Collections.singletonList(new RelationMember(null, w)));
         ds.addPrimitive(r);
         ds.lock();
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java	(revision 18690)
@@ -11,4 +11,5 @@
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedList;
@@ -52,12 +53,10 @@
         ds.addPrimitive(n2);
 
-        Collection<OsmPrimitive> all = new HashSet<>();
-        all.addAll(Arrays.asList(new OsmPrimitive[] {n1, n2}));
-
-        List<Filter> filters = new LinkedList<>();
+        Collection<OsmPrimitive> all = new HashSet<>(Arrays.asList(n1, n2));
+
         Filter f1 = new Filter();
         f1.text = "fixme";
         f1.hiding = true;
-        filters.addAll(Arrays.asList(new Filter[] {f1}));
+        List<Filter> filters = new LinkedList<>(Collections.singletonList(f1));
 
         FilterMatcher filterMatcher = new FilterMatcher();
@@ -101,5 +100,5 @@
                 Filter f2 = new Filter();
                 f2.text = "highway";
-                filters.addAll(Arrays.asList(new Filter[] {f1, f2}));
+                filters.addAll(Arrays.asList(f1, f2));
                 break;
             }
@@ -120,5 +119,5 @@
                 f2.text = "water";
                 f2.mode = SearchMode.remove;
-                filters.addAll(Arrays.asList(new Filter[] {f1, f2}));
+                filters.addAll(Arrays.asList(f1, f2));
                 break;
             }
@@ -133,5 +132,5 @@
                 Filter f3 = new Filter();
                 f3.text = "natural";
-                filters.addAll(Arrays.asList(new Filter[] {f1, f2, f3}));
+                filters.addAll(Arrays.asList(f1, f2, f3));
                 break;
             }
@@ -151,5 +150,5 @@
                 f4.text = "name";
                 f4.mode = SearchMode.remove;
-                filters.addAll(Arrays.asList(new Filter[] {f1, f2, f3, f4}));
+                filters.addAll(Arrays.asList(f1, f2, f3, f4));
                 break;
             }
@@ -163,5 +162,5 @@
                 f2.mode = SearchMode.remove;
                 f2.hiding = true; // Remove only hide flag so water should stay disabled
-                filters.addAll(Arrays.asList(new Filter[] {f1, f2}));
+                filters.addAll(Arrays.asList(f1, f2));
                 break;
             }
@@ -183,5 +182,5 @@
                     if (!osm.get(key).equals(filterCode(osm))) {
                         failedPrimitives.append(String.format(
-                                "Object %s. Expected [%s] but was [%s]%n", osm.toString(), osm.get(key), filterCode(osm)));
+                                "Object %s. Expected [%s] but was [%s]%n", osm, osm.get(key), filterCode(osm)));
                     }
                 }
@@ -189,5 +188,5 @@
             assertTrue(foundAtLeastOne);
             if (failedPrimitives.length() != 0)
-                throw new AssertionError(String.format("Run #%d%n%s", i, failedPrimitives.toString()));
+                throw new AssertionError(String.format("Run #%d%n%s", i, failedPrimitives));
         }
     }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/NodeDataTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/NodeDataTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/NodeDataTest.java	(revision 18690)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.data.osm;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -11,5 +12,4 @@
 import java.io.ObjectOutputStream;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -38,5 +38,5 @@
         data.setChangesetId(314159);
         final NodeData readData = serializeUnserialize(data);
-        Assert.assertEquals(data.toString(), readData.toString());
+        assertEquals(data.toString(), readData.toString());
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java	(revision 18690)
@@ -67,6 +67,6 @@
         n.put("key.1", "value.1");
         n.put("key.2", "value.2");
-        assertTrue(n.get("key.1").equals("value.1"));
-        assertTrue(n.get("key.2").equals("value.2"));
+        assertEquals("value.1", n.get("key.1"));
+        assertEquals("value.2", n.get("key.2"));
         testKeysSize(n, 2);
         assertTrue(n.hasKeys());
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java	(revision 18690)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.data.osm;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
@@ -7,5 +8,4 @@
 import java.util.HashSet;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
@@ -31,6 +31,5 @@
 
     private void compareReferrers(OsmPrimitive actual, OsmPrimitive... expected) {
-        Assert.assertEquals(new HashSet<>(Arrays.asList(expected)),
-                new HashSet<>(actual.getReferrers()));
+        assertEquals(new HashSet<>(Arrays.asList(expected)), new HashSet<>(actual.getReferrers()));
     }
 
@@ -149,6 +148,6 @@
         new Way(w1);
 
-        Assert.assertEquals(n.getReferrers().size(), 1);
-        Assert.assertEquals(n.getReferrers().get(0), w1);
+        assertEquals(n.getReferrers().size(), 1);
+        assertEquals(n.getReferrers().get(0), w1);
     }
 
@@ -156,5 +155,5 @@
     void testCheckMustBeInDatasate() {
         Node n = new Node();
-        assertThrows(DataIntegrityProblemException.class, () -> n.getReferrers());
+        assertThrows(DataIntegrityProblemException.class, n::getReferrers);
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTypeTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTypeTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTypeTest.java	(revision 18690)
@@ -3,5 +3,7 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 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 static org.junit.jupiter.api.Assertions.assertThrows;
@@ -51,7 +53,7 @@
     @Test
     void testGetOsmClass() {
-        assertEquals(Node.class, OsmPrimitiveType.NODE.getOsmClass());
-        assertEquals(Way.class, OsmPrimitiveType.WAY.getOsmClass());
-        assertEquals(Relation.class, OsmPrimitiveType.RELATION.getOsmClass());
+        assertSame(Node.class, OsmPrimitiveType.NODE.getOsmClass());
+        assertSame(Way.class, OsmPrimitiveType.WAY.getOsmClass());
+        assertSame(Relation.class, OsmPrimitiveType.RELATION.getOsmClass());
         assertNull(OsmPrimitiveType.CLOSEDWAY.getOsmClass());
         assertNull(OsmPrimitiveType.MULTIPOLYGON.getOsmClass());
@@ -63,9 +65,9 @@
     @Test
     void testGetDataClass() {
-        assertEquals(NodeData.class, OsmPrimitiveType.NODE.getDataClass());
-        assertEquals(WayData.class, OsmPrimitiveType.WAY.getDataClass());
-        assertEquals(RelationData.class, OsmPrimitiveType.RELATION.getDataClass());
-        assertEquals(WayData.class, OsmPrimitiveType.CLOSEDWAY.getDataClass());
-        assertEquals(RelationData.class, OsmPrimitiveType.MULTIPOLYGON.getDataClass());
+        assertSame(NodeData.class, OsmPrimitiveType.NODE.getDataClass());
+        assertSame(WayData.class, OsmPrimitiveType.WAY.getDataClass());
+        assertSame(RelationData.class, OsmPrimitiveType.RELATION.getDataClass());
+        assertSame(WayData.class, OsmPrimitiveType.CLOSEDWAY.getDataClass());
+        assertSame(RelationData.class, OsmPrimitiveType.MULTIPOLYGON.getDataClass());
     }
 
@@ -140,7 +142,7 @@
         OsmPrimitive r = OsmPrimitiveType.RELATION.newInstance(3, false);
 
-        assertTrue(n instanceof Node);
-        assertTrue(w instanceof Way);
-        assertTrue(r instanceof Relation);
+        assertInstanceOf(Node.class, n);
+        assertInstanceOf(Way.class, w);
+        assertInstanceOf(Relation.class, r);
 
         assertEquals(1, n.getId());
@@ -166,7 +168,7 @@
         OsmPrimitive r = OsmPrimitiveType.RELATION.newVersionedInstance(3, 6);
 
-        assertTrue(n instanceof Node);
-        assertTrue(w instanceof Way);
-        assertTrue(r instanceof Relation);
+        assertInstanceOf(Node.class, n);
+        assertInstanceOf(Way.class, w);
+        assertInstanceOf(Relation.class, r);
 
         assertEquals(1, n.getId());
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -35,5 +36,5 @@
     void testCreatePrimitive() {
         final OsmPrimitive p = OsmUtils.createPrimitive("way name=Foo railway=rail");
-        assertTrue(p instanceof Way);
+        assertInstanceOf(Way.class, p);
         assertEquals(2, p.getKeys().size());
         assertEquals("Foo", p.get("name"));
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java	(revision 18690)
@@ -2,4 +2,7 @@
 package org.openstreetmap.josm.data.osm;
 
+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.openstreetmap.josm.TestUtils.getPrivateField;
 
@@ -11,9 +14,9 @@
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Random;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
@@ -63,17 +66,15 @@
             ds.removePrimitive(o);
         }
-        Assert.assertTrue(nodes.isEmpty());
-        Assert.assertTrue(ways.isEmpty());
-        Assert.assertTrue(relations.isEmpty());
+        assertTrue(nodes.isEmpty());
+        assertTrue(ways.isEmpty());
+        assertTrue(relations.isEmpty());
     }
 
     private void checkIterator(Iterable<? extends OsmPrimitive> col, int expectedCount) {
         int count = 0;
-        Iterator<? extends OsmPrimitive> it = col.iterator();
-        while (it.hasNext()) {
+        for (OsmPrimitive ignored : col) {
             count++;
-            it.next();
-        }
-        Assert.assertEquals(expectedCount, count);
+        }
+        assertEquals(expectedCount, count);
     }
 
@@ -122,61 +123,61 @@
         Node n2 = new Node(2); n2.setCoor(new LatLon(10, 20));
         Node n3 = new Node(3); n2.setCoor(new LatLon(20, 30));
-        w2.setNodes(Arrays.asList(n1));
+        w2.setNodes(Collections.singletonList(n1));
         w3.setNodes(Arrays.asList(n1, n2, n3));
 
         qbNodes.add(n1);
         qbNodes.add(n2);
-        Assert.assertEquals(2, qbNodes.size());
-        Assert.assertTrue(qbNodes.contains(n1));
-        Assert.assertTrue(qbNodes.contains(n2));
-        Assert.assertFalse(qbNodes.contains(n3));
+        assertEquals(2, qbNodes.size());
+        assertTrue(qbNodes.contains(n1));
+        assertTrue(qbNodes.contains(n2));
+        assertFalse(qbNodes.contains(n3));
         qbNodes.remove(n1);
-        Assert.assertEquals(1, qbNodes.size());
-        Assert.assertFalse(qbNodes.contains(n1));
-        Assert.assertTrue(qbNodes.contains(n2));
+        assertEquals(1, qbNodes.size());
+        assertFalse(qbNodes.contains(n1));
+        assertTrue(qbNodes.contains(n2));
         qbNodes.remove(n2);
-        Assert.assertEquals(0, qbNodes.size());
-        Assert.assertFalse(qbNodes.contains(n1));
-        Assert.assertFalse(qbNodes.contains(n2));
+        assertEquals(0, qbNodes.size());
+        assertFalse(qbNodes.contains(n1));
+        assertFalse(qbNodes.contains(n2));
 
         qbNodes.addAll(Arrays.asList(n1, n2, n3));
         qbNodes.removeAll(Arrays.asList(n1, n3));
-        Assert.assertEquals(1, qbNodes.size());
-        Assert.assertTrue(qbNodes.contains(n2));
+        assertEquals(1, qbNodes.size());
+        assertTrue(qbNodes.contains(n2));
 
         qbWays.add(w1);
         qbWays.add(w2);
         qbWays.add(w3);
-        Assert.assertEquals(3, qbWays.size());
-        Assert.assertTrue(qbWays.contains(w1));
-        Assert.assertTrue(qbWays.contains(w2));
-        Assert.assertTrue(qbWays.contains(w3));
+        assertEquals(3, qbWays.size());
+        assertTrue(qbWays.contains(w1));
+        assertTrue(qbWays.contains(w2));
+        assertTrue(qbWays.contains(w3));
         qbWays.remove(w1);
-        Assert.assertEquals(2, qbWays.size());
-        Assert.assertFalse(qbWays.contains(w1));
-        Assert.assertTrue(qbWays.contains(w2));
-        Assert.assertTrue(qbWays.contains(w3));
+        assertEquals(2, qbWays.size());
+        assertFalse(qbWays.contains(w1));
+        assertTrue(qbWays.contains(w2));
+        assertTrue(qbWays.contains(w3));
         qbWays.remove(w2);
-        Assert.assertEquals(1, qbWays.size());
-        Assert.assertFalse(qbWays.contains(w1));
-        Assert.assertFalse(qbWays.contains(w2));
-        Assert.assertTrue(qbWays.contains(w3));
+        assertEquals(1, qbWays.size());
+        assertFalse(qbWays.contains(w1));
+        assertFalse(qbWays.contains(w2));
+        assertTrue(qbWays.contains(w3));
         qbWays.remove(w3);
-        Assert.assertEquals(0, qbWays.size());
-        Assert.assertFalse(qbWays.contains(w1));
-        Assert.assertFalse(qbWays.contains(w2));
-        Assert.assertFalse(qbWays.contains(w3));
+        assertEquals(0, qbWays.size());
+        assertFalse(qbWays.contains(w1));
+        assertFalse(qbWays.contains(w2));
+        assertFalse(qbWays.contains(w3));
 
         qbWays.clear();
-        Assert.assertEquals(0, qbWays.size());
+        assertEquals(0, qbWays.size());
         List<Way> allWays = new ArrayList<>(Arrays.asList(w1, w2, w3));
         qbWays.addAll(allWays);
-        Assert.assertEquals(3, qbWays.size());
+        assertEquals(3, qbWays.size());
         int count = 0;
         for (Way w : qbWays) {
-            Assert.assertTrue(allWays.contains(w));
+            assertTrue(allWays.contains(w));
             count++;
         }
-        Assert.assertEquals(3, count);
+        assertEquals(3, count);
         // test remove with iterator
         Iterator<Way> iter = qbWays.iterator();
@@ -185,7 +186,7 @@
             iter.remove();
             count--;
-            Assert.assertEquals(count, qbWays.size());
-        }
-        Assert.assertEquals(0, qbWays.size());
+            assertEquals(count, qbWays.size());
+        }
+        assertEquals(0, qbWays.size());
 
     }
@@ -221,6 +222,6 @@
             ds.addPrimitive(w);
         }
-        Assert.assertEquals(NUM_COMPLETE_WAYS, ds.getWays().size());
-        Assert.assertEquals(NUM_COMPLETE_WAYS * NUM_NODES_PER_WAY, ds.getNodes().size());
+        assertEquals(NUM_COMPLETE_WAYS, ds.getWays().size());
+        assertEquals(NUM_COMPLETE_WAYS * NUM_NODES_PER_WAY, ds.getNodes().size());
 
         // add some incomplete nodes
@@ -230,5 +231,5 @@
             ds.addPrimitive(n);
         }
-        Assert.assertEquals(NUM_COMPLETE_WAYS * NUM_NODES_PER_WAY + NUM_INCOMPLETE_NODES, ds.getNodes().size());
+        assertEquals(NUM_COMPLETE_WAYS * NUM_NODES_PER_WAY + NUM_INCOMPLETE_NODES, ds.getNodes().size());
         // add some incomplete ways
         List<Way> incompleteWays = new ArrayList<>();
@@ -239,12 +240,12 @@
             ds.addPrimitive(w);
         }
-        Assert.assertEquals(NUM_COMPLETE_WAYS + NUM_INCOMPLETE_WAYS, ds.getWays().size());
+        assertEquals(NUM_COMPLETE_WAYS + NUM_INCOMPLETE_WAYS, ds.getWays().size());
 
         BBox planet = new BBox(-180, -90, 180, 90);
         // incomplete ways should not be found with search
-        Assert.assertEquals(NUM_COMPLETE_WAYS, ds.searchWays(planet).size());
+        assertEquals(NUM_COMPLETE_WAYS, ds.searchWays(planet).size());
         // incomplete ways are only retrieved via iterator or object reference
         for (Way w : incompleteWays) {
-            Assert.assertTrue(ds.getWays().contains(w));
+            assertTrue(ds.getWays().contains(w));
         }
 
@@ -252,5 +253,5 @@
         qb.addAll(ds.getWays());
         int count = qb.size();
-        Assert.assertEquals(count, ds.getWays().size());
+        assertEquals(count, ds.getWays().size());
         Iterator<Way> iter = qb.iterator();
         while (iter.hasNext()) {
@@ -258,7 +259,7 @@
             iter.remove();
             count--;
-            Assert.assertEquals(count, qb.size());
-        }
-        Assert.assertEquals(0, qb.size());
+            assertEquals(count, qb.size());
+        }
+        assertEquals(0, qb.size());
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java	(revision 18690)
@@ -7,5 +7,4 @@
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -62,19 +61,19 @@
         BBox bbox = new BBox(w1);
         bbox.add(n3.getBBox());
-        Assert.assertEquals(bbox, r1.getBBox());
-        Assert.assertEquals(bbox, r2.getBBox());
+        assertEquals(bbox, r1.getBBox());
+        assertEquals(bbox, r2.getBBox());
 
         n3.setCoor(new LatLon(40, 40));
         bbox.add(n3.getBBox());
-        Assert.assertEquals(bbox, r1.getBBox());
-        Assert.assertEquals(bbox, r2.getBBox());
+        assertEquals(bbox, r1.getBBox());
+        assertEquals(bbox, r2.getBBox());
 
         r1.removeMembersFor(r2);
-        Assert.assertEquals(w1.getBBox(), r1.getBBox());
-        Assert.assertEquals(bbox, r2.getBBox());
+        assertEquals(w1.getBBox(), r1.getBBox());
+        assertEquals(bbox, r2.getBBox());
 
         w1.addNode(n3);
-        Assert.assertEquals(w1.getBBox(), r1.getBBox());
-        Assert.assertEquals(w1.getBBox(), r2.getBBox());
+        assertEquals(w1.getBBox(), r1.getBBox());
+        assertEquals(w1.getBBox(), r2.getBBox());
 
         // create incomplete node and add it to the relation, this must not change the bbox
@@ -85,5 +84,5 @@
         r2.addMember(new RelationMember("", n4));
 
-        Assert.assertEquals(oldBBox, r2.getBBox());
+        assertEquals(oldBBox, r2.getBBox());
     }
 
@@ -99,5 +98,5 @@
         r1.addMember(new RelationMember("", w1));
 
-        Assert.assertEquals(new BBox(w1), r1.getBBox());
+        assertEquals(new BBox(w1), r1.getBBox());
 
         DataSet ds = new DataSet();
@@ -107,21 +106,20 @@
         ds.addPrimitive(r1);
 
-        Assert.assertEquals(new BBox(w1), r1.getBBox());
+        assertEquals(new BBox(w1), r1.getBBox());
 
         ds.removePrimitive(r1);
 
         n1.setCoor(new LatLon(30, 40));
-        Assert.assertEquals(new BBox(w1), r1.getBBox());
+        assertEquals(new BBox(w1), r1.getBBox());
 
         ds.addPrimitive(r1);
-        Assert.assertEquals(new BBox(w1), r1.getBBox());
+        assertEquals(new BBox(w1), r1.getBBox());
     }
 
     /**
      * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12467">Bug #12467</a>.
-     * @throws Exception if any error occurs
      */
     @Test
-    void testTicket12467() throws Exception {
+    void testTicket12467() {
         Relation r = new Relation();
         r.put("type", "boundary");
@@ -146,5 +144,7 @@
     @Test
     void testCloneFromIAE() {
-        assertThrows(IllegalArgumentException.class, () -> new Relation().cloneFrom(new Node()));
+        final Relation relation = new Relation();
+        final Node node = new Node();
+        assertThrows(IllegalArgumentException.class, () -> relation.cloneFrom(node));
     }
 
@@ -154,5 +154,7 @@
     @Test
     void testLoadIAE() {
-        assertThrows(IllegalArgumentException.class, () -> new Relation().load(new NodeData()));
+        final Relation relation = new Relation();
+        final NodeData nodeData = new NodeData();
+        assertThrows(IllegalArgumentException.class, () -> relation.load(nodeData));
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 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;
 
@@ -17,7 +18,6 @@
 import java.util.stream.Stream;
 
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
-
-import org.junit.jupiter.api.Test;
 
 /**
@@ -84,5 +84,5 @@
     @Test
     void testUnionOfAllPrimitivesCollectionOfQextendsTagged() {
-        TagCollection c = TagCollection.unionOfAllPrimitives(Arrays.asList(tagA));
+        TagCollection c = TagCollection.unionOfAllPrimitives(Collections.singletonList(tagA));
         assertEquals(1, c.getTagOccurrence(tagA));
 
@@ -93,5 +93,5 @@
         assertTagCounts(e, 0, 0, 0, 0);
 
-        TagCollection f = TagCollection.unionOfAllPrimitives(Arrays.<Tagged>asList());
+        TagCollection f = TagCollection.unionOfAllPrimitives(Collections.emptyList());
         assertTagCounts(f, 0, 0, 0, 0);
 
@@ -193,5 +193,5 @@
         TagCollection c = new TagCollection();
         assertTagCounts(c, 0, 0, 0, 0);
-        c.add(Arrays.asList(tagC));
+        c.add(Collections.singletonList(tagC));
         assertTagCounts(c, 0, 0, 1, 0);
         c.add(Arrays.asList(tagA, tagC));
@@ -210,5 +210,5 @@
         TagCollection c = new TagCollection();
         assertTagCounts(c, 0, 0, 0, 0);
-        c.add(new TagCollection(Arrays.asList(tagC)));
+        c.add(new TagCollection(Collections.singletonList(tagC)));
         assertTagCounts(c, 0, 0, 1, 0);
         c.add(new TagCollection(Arrays.asList(tagA, tagC)));
@@ -308,5 +308,5 @@
         assertTrue(c.containsAll(Arrays.asList(tagA, tagB)));
         assertFalse(c.containsAll(Arrays.asList(tagA, tagC)));
-        assertTrue(c.containsAll(Arrays.asList()));
+        assertTrue(c.containsAll(Collections.emptyList()));
         assertFalse(c.containsAll(null));
     }
@@ -320,5 +320,5 @@
         assertTrue(c.containsAllKeys(Arrays.asList("k", "k2")));
         assertFalse(c.containsAllKeys(Arrays.asList("k", "k3")));
-        assertTrue(c.containsAllKeys(Arrays.asList()));
+        assertTrue(c.containsAllKeys(Collections.emptyList()));
         assertFalse(c.containsAllKeys(null));
     }
@@ -394,5 +394,5 @@
         assertFalse(c.hasUniqueEmptyValue("k3"));
 
-        TagCollection d = new TagCollection(Arrays.asList());
+        TagCollection d = new TagCollection(Collections.emptyList());
         assertFalse(d.hasUniqueEmptyValue("k"));
         assertFalse(d.hasUniqueEmptyValue("k2"));
@@ -453,5 +453,5 @@
     @Test
     void testIterator() {
-        TagCollection d = new TagCollection(Arrays.asList(tagA));
+        TagCollection d = new TagCollection(Collections.singletonList(tagA));
         Iterator<Tag> it = d.iterator();
         assertTrue(it.hasNext());
@@ -556,7 +556,7 @@
         assertEquals("b", tagged.get("k2"));
         assertEquals("x", tagged.get("k3"));
-        TagCollection d = new TagCollection(Arrays.asList(tagEmpty));
+        TagCollection d = new TagCollection(Collections.singletonList(tagEmpty));
         d.applyTo(tagged);
-        assertEquals(null, tagged.get("k"));
+        assertNull(tagged.get("k"));
     }
 
@@ -591,5 +591,5 @@
         assertEquals("v", tagged.get("k"));
         assertEquals("b", tagged.get("k2"));
-        assertEquals(null, tagged.get("k3"));
+        assertNull(tagged.get("k3"));
     }
 
@@ -609,5 +609,5 @@
         assertEquals("v", tagged2.get("k"));
         assertEquals("b", tagged2.get("k2"));
-        assertEquals(null, tagged2.get("k3"));
+        assertNull(tagged2.get("k3"));
     }
 
@@ -671,5 +671,5 @@
     @Test
     void testGetJoinedValues() {
-        TagCollection c = new TagCollection(Arrays.asList(new Tag("k", "a")));
+        TagCollection c = new TagCollection(Collections.singletonList(new Tag("k", "a")));
         assertEquals("a", c.getJoinedValues("k"));
         TagCollection d = new TagCollection(Arrays.asList(new Tag("k", "a"), new Tag("k", "b")));
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/WayDataTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/WayDataTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/WayDataTest.java	(revision 18690)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.osm;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.ByteArrayInputStream;
@@ -8,5 +10,4 @@
 import java.util.Arrays;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 
@@ -31,5 +32,5 @@
             }
         }
-        Assert.assertEquals(data.toString(), readData.toString());
+        assertEquals(data.toString(), readData.toString());
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/WaySegmentTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/WaySegmentTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/WaySegmentTest.java	(revision 18690)
@@ -2,7 +2,9 @@
 package org.openstreetmap.josm.data.osm;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
 import java.util.Arrays;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
@@ -25,5 +27,5 @@
 
     @Test
-    void testForNodePair() throws Exception {
+    void testForNodePair() {
         final DataSet ds = new DataSet();
         final Node n1 = new Node(LatLon.ZERO);
@@ -42,14 +44,10 @@
         w.addNode(n4);
         w.addNode(n1);
-        Assert.assertEquals(WaySegment.forNodePair(w, n1, n2).getLowerIndex(), 0);
-        Assert.assertEquals(WaySegment.forNodePair(w, n1, n3).getLowerIndex(), 2);
-        Assert.assertEquals(WaySegment.forNodePair(w, n1, n4).getLowerIndex(), 4);
-        Assert.assertEquals(WaySegment.forNodePair(w, n4, n1).getLowerIndex(), 5);
-        try {
-            Assert.assertEquals(WaySegment.forNodePair(w, n3, n4).getLowerIndex(), 5);
-            throw new IllegalStateException("Expecting IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-            System.out.println("Expected exception: " + expected.getMessage());
-        }
+        assertEquals(WaySegment.forNodePair(w, n1, n2).getLowerIndex(), 0);
+        assertEquals(WaySegment.forNodePair(w, n1, n3).getLowerIndex(), 2);
+        assertEquals(WaySegment.forNodePair(w, n1, n4).getLowerIndex(), 4);
+        assertEquals(WaySegment.forNodePair(w, n4, n1).getLowerIndex(), 5);
+        IllegalArgumentException iae = assertThrows(IllegalArgumentException.class, () -> WaySegment.forNodePair(w, n3, n4));
+        assertEquals("Node pair is not part of way!", iae.getMessage());
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java	(revision 18690)
@@ -3,6 +3,6 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+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.time.Instant;
@@ -11,13 +11,11 @@
 import java.util.Map;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
-import org.openstreetmap.josm.tools.Logging;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -78,11 +76,5 @@
         assertEquals(1, way.getNumNodes());
         assertEquals(1, way.getNodeId(0));
-        try {
-            way.getNodeId(1);
-            fail("expected expection of type " + IndexOutOfBoundsException.class.toString());
-        } catch (IndexOutOfBoundsException e) {
-            // OK
-            Logging.trace(e);
-        }
+        assertThrows(IndexOutOfBoundsException.class, () -> way.getNodeId(1));
 
         way.addNode(5);
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 18690)
@@ -19,5 +19,4 @@
 import java.util.Set;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Timeout;
@@ -430,8 +429,7 @@
     /**
      * Compiles "foo type bar" and tests the parse error message
-     * @throws SearchParseError always
-     */
-    @Test
-    void testFooTypeBar() throws SearchParseError {
+     */
+    @Test
+    void testFooTypeBar() {
         Exception e = assertThrows(SearchParseError.class, () -> SearchCompiler.compile("foo type bar"));
         assertEquals("<html>Expecting <code>:</code> after <i>type</i></html>", e.getMessage());
@@ -754,5 +752,5 @@
         TestUtils.assumeWorkingEqualsVerifier();
         Set<Class<? extends Match>> matchers = TestUtils.getJosmSubtypes(Match.class);
-        Assert.assertTrue(matchers.size() >= 10); // if it finds less than 10 classes, something is broken
+        assertTrue(matchers.size() >= 10); // if it finds less than 10 classes, something is broken
         for (Class<?> c : matchers) {
             Logging.debug(c.toString());
Index: trunk/test/unit/org/openstreetmap/josm/data/preferences/StrokePropertyTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/preferences/StrokePropertyTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/preferences/StrokePropertyTest.java	(revision 18690)
@@ -4,11 +4,11 @@
 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 java.awt.BasicStroke;
 
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
-
-import org.junit.jupiter.api.Test;
 
 /**
@@ -30,5 +30,5 @@
         assertWide(bs);
         assertEquals(11, bs.getLineWidth(), 1e-10);
-        assertEquals(null, bs.getDashArray());
+        assertNull(bs.getDashArray());
 
         Config.getPref().put("x", ".5");
@@ -36,5 +36,5 @@
         assertThin(bs);
         assertEquals(.5, bs.getLineWidth(), 1e-10);
-        assertEquals(null, bs.getDashArray());
+        assertNull(bs.getDashArray());
 
         Config.getPref().put("x", "2 1");
@@ -54,5 +54,5 @@
         assertThin(bs);
         assertEquals(1, bs.getLineWidth(), 1e-10);
-        assertEquals(null, bs.getDashArray());
+        assertNull(bs.getDashArray());
 
         // ignore dashes
@@ -61,5 +61,5 @@
         assertWide(bs);
         assertEquals(11, bs.getLineWidth(), 1e-10);
-        assertEquals(null, bs.getDashArray());
+        assertNull(bs.getDashArray());
     }
 
@@ -74,5 +74,5 @@
         assertWide(bs);
         assertEquals(12, bs.getLineWidth(), 1e-10);
-        assertEquals(null, bs.getDashArray());
+        assertNull(bs.getDashArray());
 
         property.put(new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[] {0.1f, 1, 10}, 0));
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/EllipsoidTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/EllipsoidTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/EllipsoidTest.java	(revision 18690)
@@ -1,9 +1,10 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.projection;
+
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.security.SecureRandom;
 import java.util.Random;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -37,6 +38,5 @@
                     String error = String.format("point: %s iterations: %s current: %s errorLat: %s errorLon %s",
                             new LatLon(lat, lon), i, ll, Math.abs(lat - ll.lat()), Math.abs(lon - ll.lon()));
-                    System.err.println(error);
-                    Assert.fail();
+                    fail(error);
                 }
             }
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 18690)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.projection;
+
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.BufferedReader;
@@ -34,5 +36,4 @@
 import java.util.regex.Pattern;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -133,5 +134,5 @@
                     Matcher m = projPattern.matcher(line);
                     if (!m.matches()) {
-                        Assert.fail("unable to parse line: " + line);
+                        fail("unable to parse line: " + line);
                     }
                     String code = m.group(1);
@@ -383,5 +384,5 @@
         refs.stream().map(ref -> ref.code).forEach(allCodes::remove);
         if (!allCodes.isEmpty()) {
-            Assert.fail("no reference data for following projections: "+allCodes);
+            fail("no reference data for following projections: "+allCodes);
         }
 
@@ -389,5 +390,5 @@
             String def0 = Projections.getInit(ref.code);
             if (def0 == null) {
-                Assert.fail("unknown code: "+ref.code);
+                fail("unknown code: "+ref.code);
             }
             if (!ref.def.equals(def0)) {
@@ -411,5 +412,5 @@
                                 "        expected: eastnorth(%s,%s),%n" +
                                 "        but got:  eastnorth(%s,%s)!%n",
-                                proj.toString(), proj.toCode(), ll.lat(), ll.lon(), enRef.east(), enRef.north(), en.east(), en.north());
+                                proj, proj.toCode(), ll.lat(), ll.lon(), enRef.east(), enRef.north(), en.east(), en.north());
                         failures.add(errorEN);
                         failingProjs.computeIfAbsent(proj.proj.getProj4Id(), x -> new TreeSet<>()).add(ref.code);
@@ -419,5 +420,5 @@
         });
         if (!failures.isEmpty()) {
-            System.err.println(failures.toString());
+            System.err.println(failures);
             throw new AssertionError("Failing:\n" +
                     failingProjs.keySet().size() + " projections: " + failingProjs.keySet() + "\n" +
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java	(revision 18690)
@@ -161,5 +161,5 @@
         for (String code : Projections.getAllProjectionCodes()) {
             if (!dataCodes.contains(code)) {
-                 fail.append("Did not find projection "+code+" in test data!\n");
+                 fail.append("Did not find projection ").append(code).append(" in test data!\n");
              }
         }
@@ -169,5 +169,5 @@
             Projection proj = Projections.getProjectionByCode(data.code);
             if (proj == null) {
-                fail.append("Projection "+data.code+" from test data was not found!\n");
+                fail.append("Projection ").append(data.code).append(" from test data was not found!\n");
                 continue;
             }
@@ -178,5 +178,5 @@
                         "        expected: eastnorth(%s,%s),%n" +
                         "        but got:  eastnorth(%s,%s)!%n",
-                        proj.toString(), data.code, data.ll.lat(), data.ll.lon(), data.en.east(), data.en.north(), en.east(), en.north());
+                        proj, data.code, data.ll.lat(), data.ll.lon(), data.en.east(), data.en.north(), en.east(), en.north());
                 fail.append(error);
             }
@@ -185,5 +185,5 @@
                         "        expected: latlon(%s,%s),%n" +
                         "        but got:  latlon(%s,%s)!%n",
-                        proj.toString(), data.code, data.en.east(), data.en.north(), data.ll2.lat(), data.ll2.lon(), ll2.lat(), ll2.lon());
+                        proj, data.code, data.en.east(), data.en.north(), data.ll2.lat(), data.ll2.lon(), ll2.lat(), ll2.lon());
                 fail.append(error);
             }
@@ -191,5 +191,5 @@
 
         if (fail.length() > 0) {
-            System.err.println(fail.toString());
+            System.err.println(fail);
             throw new AssertionError(fail.toString());
         }
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java	(revision 18690)
@@ -3,4 +3,5 @@
 
 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.security.SecureRandom;
@@ -10,5 +11,4 @@
 import java.util.Random;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.Bounds;
@@ -40,9 +40,9 @@
 
         for (int i = 0; i <= 3; ++i) {
-            testProjection(Projections.getProjectionByCode("EPSG:"+Integer.toString(27561+i))); // Lambert 4 Zones France
+            testProjection(Projections.getProjectionByCode("EPSG:"+ (27561 + i))); // Lambert 4 Zones France
         }
 
         for (int i = 0; i <= 4; ++i) {
-            testProjection(Projections.getProjectionByCode("EPSG:"+Integer.toString(2176+i))); // PUWG Poland
+            testProjection(Projections.getProjectionByCode("EPSG:"+ (2176 + i))); // PUWG Poland
         }
 
@@ -50,6 +50,6 @@
 
         for (int i = 0; i <= 60; ++i) {
-            testProjection(Projections.getProjectionByCode("EPSG:"+Integer.toString(32601+i))); // UTM North
-            testProjection(Projections.getProjectionByCode("EPSG:"+Integer.toString(32701+i))); // UTM South
+            testProjection(Projections.getProjectionByCode("EPSG:"+ (32601 + i))); // UTM North
+            testProjection(Projections.getProjectionByCode("EPSG:"+ (32701 + i))); // UTM South
         }
 
@@ -59,9 +59,9 @@
 
         for (int i = 0; i <= 8; ++i) {
-            testProjection(Projections.getProjectionByCode("EPSG:"+Integer.toString(3942+i))); // Lambert CC9 Zones France
+            testProjection(Projections.getProjectionByCode("EPSG:"+ (3942 + i))); // Lambert CC9 Zones France
         }
 
         for (int i = 0; i <= 17; ++i) {
-            testProjection(Projections.getProjectionByCode("EPSG:"+Integer.toString(102421+i))); // WGS_1984_ARC_System Zones
+            testProjection(Projections.getProjectionByCode("EPSG:"+ (102421 + i))); // WGS_1984_ARC_System Zones
         }
 
@@ -70,6 +70,5 @@
 
         if (error) {
-            System.err.println(text);
-            Assert.fail();
+            fail(text);
         }
     }
@@ -80,5 +79,5 @@
             Bounds b = p.getWorldBoundsLatLon();
 
-            text += String.format("*** %s %s%n", p.toString(), p.toCode());
+            text += String.format("*** %s %s%n", p, p.toCode());
             for (int num = 0; num < 1000; ++num) {
 
@@ -148,6 +147,5 @@
 
         if (error2) {
-            System.err.println(text2);
-            Assert.fail();
+            fail(text2);
         }
         assertTrue(projIds.isEmpty(), "missing test: "+projIds);
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionsTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionsTest.java	(revision 18690)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.data.projection;
 
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import org.junit.jupiter.api.Test;
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTest.java	(revision 18690)
@@ -17,9 +17,11 @@
 package org.openstreetmap.josm.data.validation.routines;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.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;
 
@@ -30,4 +32,7 @@
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
+import org.junit.jupiter.params.provider.ValueSource;
 import org.openstreetmap.josm.data.validation.routines.DomainValidator.ArrayType;
 import org.openstreetmap.josm.tools.Logging;
@@ -56,17 +61,17 @@
     @Test
     void testValidDomains() {
-        assertTrue("apache.org should validate", validator.isValid("apache.org"));
-        assertTrue("www.google.com should validate", validator.isValid("www.google.com"));
-
-        assertTrue("test-domain.com should validate", validator.isValid("test-domain.com"));
-        assertTrue("test---domain.com should validate", validator.isValid("test---domain.com"));
-        assertTrue("test-d-o-m-ain.com should validate", validator.isValid("test-d-o-m-ain.com"));
-        assertTrue("two-letter domain label should validate", validator.isValid("as.uk"));
-
-        assertTrue("case-insensitive ApAchE.Org should validate", validator.isValid("ApAchE.Org"));
-
-        assertTrue("single-character domain label should validate", validator.isValid("z.com"));
-
-        assertTrue("i.have.an-example.domain.name should validate", validator.isValid("i.have.an-example.domain.name"));
+        assertTrue(validator.isValid("apache.org"), "apache.org should validate");
+        assertTrue(validator.isValid("www.google.com"), "www.google.com should validate");
+
+        assertTrue(validator.isValid("test-domain.com"), "test-domain.com should validate");
+        assertTrue(validator.isValid("test---domain.com"), "test---domain.com should validate");
+        assertTrue(validator.isValid("test-d-o-m-ain.com"), "test-d-o-m-ain.com should validate");
+        assertTrue(validator.isValid("as.uk"), "two-letter domain label should validate");
+
+        assertTrue(validator.isValid("ApAchE.Org"), "case-insensitive ApAchE.Org should validate");
+
+        assertTrue(validator.isValid("z.com"), "single-character domain label should validate");
+
+        assertTrue(validator.isValid("i.have.an-example.domain.name"), "i.have.an-example.domain.name should validate");
     }
 
@@ -76,16 +81,16 @@
     @Test
     void testInvalidDomains() {
-        assertFalse("bare TLD .org shouldn't validate", validator.isValid(".org"));
-        assertFalse("domain name with spaces shouldn't validate", validator.isValid(" apache.org "));
-        assertFalse("domain name containing spaces shouldn't validate", validator.isValid("apa che.org"));
-        assertFalse("domain name starting with dash shouldn't validate", validator.isValid("-testdomain.name"));
-        assertFalse("domain name ending with dash shouldn't validate", validator.isValid("testdomain-.name"));
-        assertFalse("domain name starting with multiple dashes shouldn't validate", validator.isValid("---c.com"));
-        assertFalse("domain name ending with multiple dashes shouldn't validate", validator.isValid("c--.com"));
-        assertFalse("domain name with invalid TLD shouldn't validate", validator.isValid("apache.rog"));
-
-        assertFalse("URL shouldn't validate", validator.isValid("http://www.apache.org"));
-        assertFalse("Empty string shouldn't validate as domain name", validator.isValid(" "));
-        assertFalse("Null shouldn't validate as domain name", validator.isValid(null));
+        assertFalse(validator.isValid(".org"), "bare TLD .org shouldn't validate");
+        assertFalse(validator.isValid(" apache.org "), "domain name with spaces shouldn't validate");
+        assertFalse(validator.isValid("apa che.org"), "domain name containing spaces shouldn't validate");
+        assertFalse(validator.isValid("-testdomain.name"), "domain name starting with dash shouldn't validate");
+        assertFalse(validator.isValid("testdomain-.name"), "domain name ending with dash shouldn't validate");
+        assertFalse(validator.isValid("---c.com"), "domain name starting with multiple dashes shouldn't validate");
+        assertFalse(validator.isValid("c--.com"), "domain name ending with multiple dashes shouldn't validate");
+        assertFalse(validator.isValid("apache.rog"), "domain name with invalid TLD shouldn't validate");
+
+        assertFalse(validator.isValid("http://www.apache.org"), "URL shouldn't validate");
+        assertFalse(validator.isValid(" "), "Empty string shouldn't validate as domain name");
+        assertFalse(validator.isValid(null), "Null shouldn't validate as domain name");
     }
 
@@ -96,23 +101,23 @@
     void testTopLevelDomains() {
         // infrastructure TLDs
-        assertTrue(".arpa should validate as iTLD", validator.isValidInfrastructureTld(".arpa"));
-        assertFalse(".com shouldn't validate as iTLD", validator.isValidInfrastructureTld(".com"));
+        assertTrue(validator.isValidInfrastructureTld(".arpa"), ".arpa should validate as iTLD");
+        assertFalse(validator.isValidInfrastructureTld(".com"), ".com shouldn't validate as iTLD");
 
         // generic TLDs
-        assertTrue(".name should validate as gTLD", validator.isValidGenericTld(".name"));
-        assertFalse(".us shouldn't validate as gTLD", validator.isValidGenericTld(".us"));
+        assertTrue(validator.isValidGenericTld(".name"), ".name should validate as gTLD");
+        assertFalse(validator.isValidGenericTld(".us"), ".us shouldn't validate as gTLD");
 
         // country code TLDs
-        assertTrue(".uk should validate as ccTLD", validator.isValidCountryCodeTld(".uk"));
-        assertFalse(".org shouldn't validate as ccTLD", validator.isValidCountryCodeTld(".org"));
+        assertTrue(validator.isValidCountryCodeTld(".uk"), ".uk should validate as ccTLD");
+        assertFalse(validator.isValidCountryCodeTld(".org"), ".org shouldn't validate as ccTLD");
 
         // case-insensitive
-        assertTrue(".COM should validate as TLD", validator.isValidTld(".COM"));
-        assertTrue(".BiZ should validate as TLD", validator.isValidTld(".BiZ"));
+        assertTrue(validator.isValidTld(".COM"), ".COM should validate as TLD");
+        assertTrue(validator.isValidTld(".BiZ"), ".BiZ should validate as TLD");
 
         // corner cases
-        assertFalse("invalid TLD shouldn't validate", validator.isValid(".nope")); // TODO this is not guaranteed invalid forever
-        assertFalse("empty string shouldn't validate as TLD", validator.isValid(""));
-        assertFalse("null shouldn't validate as TLD", validator.isValid(null));
+        assertFalse(validator.isValid(".nope"), "invalid TLD shouldn't validate"); // TODO this is not guaranteed invalid forever
+        assertFalse(validator.isValid(""), "empty string shouldn't validate as TLD");
+        assertFalse(validator.isValid(null), "null shouldn't validate as TLD");
     }
 
@@ -125,20 +130,20 @@
        DomainValidator allowLocal = DomainValidator.getInstance(true);
 
-       // Default is false, and should use singletons
-       assertEquals(noLocal, validator);
+       // Should use singletons
+       assertSame(noLocal, validator);
 
        // Default won't allow local
-       assertFalse("localhost.localdomain should validate", noLocal.isValid("localhost.localdomain"));
-       assertFalse("localhost should validate", noLocal.isValid("localhost"));
+       assertFalse(noLocal.isValid("localhost.localdomain"), "localhost.localdomain should validate");
+       assertFalse(noLocal.isValid("localhost"), "localhost should validate");
 
        // But it may be requested
-       assertTrue("localhost.localdomain should validate", allowLocal.isValid("localhost.localdomain"));
-       assertTrue("localhost should validate", allowLocal.isValid("localhost"));
-       assertTrue("hostname should validate", allowLocal.isValid("hostname"));
-       assertTrue("machinename should validate", allowLocal.isValid("machinename"));
+       assertTrue(allowLocal.isValid("localhost.localdomain"), "localhost.localdomain should validate");
+       assertTrue(allowLocal.isValid("localhost"), "localhost should validate");
+       assertTrue(allowLocal.isValid("hostname"), "hostname should validate");
+       assertTrue(allowLocal.isValid("machinename"), "machinename should validate");
 
        // Check the localhost one with a few others
-       assertTrue("apache.org should validate", allowLocal.isValid("apache.org"));
-       assertFalse("domain name with spaces shouldn't validate", allowLocal.isValid(" apache.org "));
+       assertTrue(allowLocal.isValid("apache.org"), "apache.org should validate");
+       assertFalse(allowLocal.isValid(" apache.org "), "domain name with spaces shouldn't validate");
     }
 
@@ -148,21 +153,10 @@
     @Test
     void testIDN() {
-       assertTrue("b\u00fccher.ch in IDN should validate", validator.isValid("www.xn--bcher-kva.ch"));
-    }
-
-    /**
-     * Test IDN with Java >= 6.
-     */
-    @Test
-    void testIDNJava6OrLater() {
-        String version = System.getProperty("java.version");
-        if (version.compareTo("1.6") < 0) {
-            System.out.println("Cannot run Unicode IDN tests");
-            return; // Cannot run the test
-        } // xn--d1abbgf6aiiy.xn--p1ai http://президент.рф
-       assertTrue("b\u00fccher.ch should validate", validator.isValid("www.b\u00fccher.ch"));
-       assertTrue("xn--d1abbgf6aiiy.xn--p1ai should validate", validator.isValid("xn--d1abbgf6aiiy.xn--p1ai"));
-       assertTrue("президент.рф should validate", validator.isValid("президент.рф"));
-       assertFalse("www.\uFFFD.ch FFFD should fail", validator.isValid("www.\uFFFD.ch"));
+       assertTrue(validator.isValid("www.xn--bcher-kva.ch"), "b\u00fccher.ch in IDN should validate");
+       assertTrue(validator.isValid("www.b\u00fccher.ch"), "b\u00fccher.ch should validate");
+       // xn--d1abbgf6aiiy.xn--p1ai http://президент.рф
+       assertTrue(validator.isValid("xn--d1abbgf6aiiy.xn--p1ai"), "xn--d1abbgf6aiiy.xn--p1ai should validate");
+       assertTrue(validator.isValid("президент.рф"), "президент.рф should validate");
+       assertFalse(validator.isValid("www.\uFFFD.ch"), "www.\uFFFD.ch FFFD should fail");
     }
 
@@ -172,11 +166,11 @@
     @Test
     void testRFC2396domainlabel() { // use fixed valid TLD
-        assertTrue("a.ch should validate", validator.isValid("a.ch"));
-        assertTrue("9.ch should validate", validator.isValid("9.ch"));
-        assertTrue("az.ch should validate", validator.isValid("az.ch"));
-        assertTrue("09.ch should validate", validator.isValid("09.ch"));
-        assertTrue("9-1.ch should validate", validator.isValid("9-1.ch"));
-        assertFalse("91-.ch should not validate", validator.isValid("91-.ch"));
-        assertFalse("-.ch should not validate", validator.isValid("-.ch"));
+        assertTrue(validator.isValid("a.ch"), "a.ch should validate");
+        assertTrue(validator.isValid("9.ch"), "9.ch should validate");
+        assertTrue(validator.isValid("az.ch"), "az.ch should validate");
+        assertTrue(validator.isValid("09.ch"), "09.ch should validate");
+        assertTrue(validator.isValid("9-1.ch"), "9-1.ch should validate");
+        assertFalse(validator.isValid("91-.ch"), "91-.ch should not validate");
+        assertFalse(validator.isValid("-.ch"), "-.ch should not validate");
     }
 
@@ -187,14 +181,14 @@
     void testRFC2396toplabel() {
         // These tests use non-existent TLDs so currently need to use a package protected method
-        assertTrue("a.c (alpha) should validate", validator.isValidDomainSyntax("a.c"));
-        assertTrue("a.cc (alpha alpha) should validate", validator.isValidDomainSyntax("a.cc"));
-        assertTrue("a.c9 (alpha alphanum) should validate", validator.isValidDomainSyntax("a.c9"));
-        assertTrue("a.c-9 (alpha - alphanum) should validate", validator.isValidDomainSyntax("a.c-9"));
-        assertTrue("a.c-z (alpha - alpha) should validate", validator.isValidDomainSyntax("a.c-z"));
-
-        assertFalse("a.9c (alphanum alpha) should fail", validator.isValidDomainSyntax("a.9c"));
-        assertFalse("a.c- (alpha -) should fail", validator.isValidDomainSyntax("a.c-"));
-        assertFalse("a.- (-) should fail", validator.isValidDomainSyntax("a.-"));
-        assertFalse("a.-9 (- alphanum) should fail", validator.isValidDomainSyntax("a.-9"));
+        assertTrue(validator.isValidDomainSyntax("a.c"), "a.c (alpha) should validate");
+        assertTrue(validator.isValidDomainSyntax("a.cc"), "a.cc (alpha alpha) should validate");
+        assertTrue(validator.isValidDomainSyntax("a.c9"), "a.c9 (alpha alphanum) should validate");
+        assertTrue(validator.isValidDomainSyntax("a.c-9"), "a.c-9 (alpha - alphanum) should validate");
+        assertTrue(validator.isValidDomainSyntax("a.c-z"), "a.c-z (alpha - alpha) should validate");
+
+        assertFalse(validator.isValidDomainSyntax("a.9c"), "a.9c (alphanum alpha) should fail");
+        assertFalse(validator.isValidDomainSyntax("a.c-"), "a.c- (alpha -) should fail");
+        assertFalse(validator.isValidDomainSyntax("a.-"), "a.- (-) should fail");
+        assertFalse(validator.isValidDomainSyntax("a.-9"), "a.-9 (- alphanum) should fail");
     }
 
@@ -204,11 +198,11 @@
     @Test
     void testDomainNoDots() {
-        assertTrue("a (alpha) should validate", validator.isValidDomainSyntax("a"));
-        assertTrue("9 (alphanum) should validate", validator.isValidDomainSyntax("9"));
-        assertTrue("c-z (alpha - alpha) should validate", validator.isValidDomainSyntax("c-z"));
-
-        assertFalse("c- (alpha -) should fail", validator.isValidDomainSyntax("c-"));
-        assertFalse("-c (- alpha) should fail", validator.isValidDomainSyntax("-c"));
-        assertFalse("- (-) should fail", validator.isValidDomainSyntax("-"));
+        assertTrue(validator.isValidDomainSyntax("a"), "a (alpha) should validate");
+        assertTrue(validator.isValidDomainSyntax("9"), "9 (alphanum) should validate");
+        assertTrue(validator.isValidDomainSyntax("c-z"), "c-z (alpha - alpha) should validate");
+
+        assertFalse(validator.isValidDomainSyntax("c-"), "c- (alpha -) should fail");
+        assertFalse(validator.isValidDomainSyntax("-c"), "-c (- alpha) should fail");
+        assertFalse(validator.isValidDomainSyntax("-"), "- (-) should fail");
     }
 
@@ -218,5 +212,5 @@
     @Test
     void testValidator297() {
-        assertTrue("xn--d1abbgf6aiiy.xn--p1ai should validate", validator.isValid("xn--d1abbgf6aiiy.xn--p1ai")); // This uses a valid TLD
+        assertTrue(validator.isValid("xn--d1abbgf6aiiy.xn--p1ai"), "xn--d1abbgf6aiiy.xn--p1ai should validate"); // This uses a valid TLD
      }
 
@@ -230,9 +224,9 @@
         assertEquals(63, longString.length()); // 26 * 2 + 11
 
-        assertTrue("63 chars label should validate", validator.isValidDomainSyntax(longString+".com"));
-        assertFalse("64 chars label should fail", validator.isValidDomainSyntax(longString+"x.com"));
-
-        assertTrue("63 chars TLD should validate", validator.isValidDomainSyntax("test."+longString));
-        assertFalse("64 chars TLD should fail", validator.isValidDomainSyntax("test.x"+longString));
+        assertTrue(validator.isValidDomainSyntax(longString+".com"), "63 chars label should validate");
+        assertFalse(validator.isValidDomainSyntax(longString+"x.com"), "64 chars label should fail");
+
+        assertTrue(validator.isValidDomainSyntax("test."+longString), "63 chars TLD should validate");
+        assertFalse(validator.isValidDomainSyntax("test.x"+longString), "64 chars TLD should fail");
 
         final String longDomain =
@@ -242,6 +236,6 @@
                 + "." + longString.substring(0, 61);
         assertEquals(253, longDomain.length());
-        assertTrue("253 chars domain should validate", validator.isValidDomainSyntax(longDomain));
-        assertFalse("254 chars domain should fail", validator.isValidDomainSyntax(longDomain+"x"));
+        assertTrue(validator.isValidDomainSyntax(longDomain), "253 chars domain should validate");
+        assertFalse(validator.isValidDomainSyntax(longDomain+"x"), "254 chars domain should fail");
     }
 
@@ -288,37 +282,8 @@
      * @throws Exception if an error occurs
      */
-    @Test
-    void test_INFRASTRUCTURE_TLDS_sortedAndLowerCase() throws Exception {
-        final boolean sorted = isSortedLowerCase("INFRASTRUCTURE_TLDS");
-        assertTrue(sorted);
-    }
-
-    /**
-     * Check array is sorted and is lower-case
-     * @throws Exception if an error occurs
-     */
-    @Test
-    void test_COUNTRY_CODE_TLDS_sortedAndLowerCase() throws Exception {
-        final boolean sorted = isSortedLowerCase("COUNTRY_CODE_TLDS");
-        assertTrue(sorted);
-    }
-
-    /**
-     * Check array is sorted and is lower-case
-     * @throws Exception if an error occurs
-     */
-    @Test
-    void test_GENERIC_TLDS_sortedAndLowerCase() throws Exception {
-        final boolean sorted = isSortedLowerCase("GENERIC_TLDS");
-        assertTrue(sorted);
-    }
-
-    /**
-     * Check array is sorted and is lower-case
-     * @throws Exception if an error occurs
-     */
-    @Test
-    void test_LOCAL_TLDS_sortedAndLowerCase() throws Exception {
-        final boolean sorted = isSortedLowerCase("LOCAL_TLDS");
+    @ParameterizedTest
+    @ValueSource(strings = {"COUNTRY_CODE_TLDS", "GENERIC_TLDS", "INFRASTRUCTURE_TLDS", "LOCAL_TLDS"})
+    void testArraySortedAndLowerCase(String arrayName) throws Exception {
+        final boolean sorted = isSortedLowerCase(arrayName);
         assertTrue(sorted);
     }
@@ -335,34 +300,8 @@
      * Test update base arrays
      */
-    @Test
-    void testUpdateBaseArrays() {
-        try {
-            DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_RO, new String[]{"com"});
-            fail("Expected IllegalArgumentException");
-        } catch (IllegalArgumentException iae) {
-            // expected
-            Logging.debug(iae.getMessage());
-        }
-        try {
-            DomainValidator.updateTLDOverride(ArrayType.GENERIC_RO, new String[]{"com"});
-            fail("Expected IllegalArgumentException");
-        } catch (IllegalArgumentException iae) {
-            // expected
-            Logging.debug(iae.getMessage());
-        }
-        try {
-            DomainValidator.updateTLDOverride(ArrayType.INFRASTRUCTURE_RO, new String[]{"com"});
-            fail("Expected IllegalArgumentException");
-        } catch (IllegalArgumentException iae) {
-            // expected
-            Logging.debug(iae.getMessage());
-        }
-        try {
-            DomainValidator.updateTLDOverride(ArrayType.LOCAL_RO, new String[]{"com"});
-            fail("Expected IllegalArgumentException");
-        } catch (IllegalArgumentException iae) {
-            // expected
-            Logging.debug(iae.getMessage());
-        }
+    @ParameterizedTest
+    @EnumSource(value = ArrayType.class, mode = EnumSource.Mode.MATCH_ALL, names = "^.*RO$")
+    void testUpdateBaseArrays(ArrayType type) {
+        Logging.debug(assertThrows(IllegalArgumentException.class, () -> DomainValidator.updateTLDOverride(type, "com")));
     }
 
@@ -370,14 +309,8 @@
      * Test get array.
      */
-    @Test
-    void testGetArray() {
-        assertNotNull(DomainValidator.getTLDEntries(ArrayType.COUNTRY_CODE_MINUS));
-        assertNotNull(DomainValidator.getTLDEntries(ArrayType.COUNTRY_CODE_PLUS));
-        assertNotNull(DomainValidator.getTLDEntries(ArrayType.GENERIC_MINUS));
-        assertNotNull(DomainValidator.getTLDEntries(ArrayType.GENERIC_PLUS));
-        assertNotNull(DomainValidator.getTLDEntries(ArrayType.COUNTRY_CODE_RO));
-        assertNotNull(DomainValidator.getTLDEntries(ArrayType.GENERIC_RO));
-        assertNotNull(DomainValidator.getTLDEntries(ArrayType.INFRASTRUCTURE_RO));
-        assertNotNull(DomainValidator.getTLDEntries(ArrayType.LOCAL_RO));
+    @ParameterizedTest
+    @EnumSource(ArrayType.class)
+    void testGetArray(ArrayType type) {
+        assertNotNull(DomainValidator.getTLDEntries(type));
     }
 
@@ -388,13 +321,13 @@
     void testUpdateCountryCode() {
         assertFalse(validator.isValidCountryCodeTld("com")); // cannot be valid
-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_PLUS, new String[]{"com"});
+        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_PLUS, "com");
         assertTrue(validator.isValidCountryCodeTld("com")); // it is now!
-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, new String[]{"com"});
+        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, "com");
         assertFalse(validator.isValidCountryCodeTld("com")); // show that minus overrides the rest
 
         assertTrue(validator.isValidCountryCodeTld("ch"));
-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, new String[]{"ch"});
+        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, "ch");
         assertFalse(validator.isValidCountryCodeTld("ch"));
-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, new String[]{"xx"});
+        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_MINUS, "xx");
         assertTrue(validator.isValidCountryCodeTld("ch"));
     }
@@ -406,13 +339,13 @@
     void testUpdateGeneric() {
         assertFalse(validator.isValidGenericTld("ch")); // cannot be valid
-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"});
+        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, "ch");
         assertTrue(validator.isValidGenericTld("ch")); // it is now!
-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"ch"});
+        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, "ch");
         assertFalse(validator.isValidGenericTld("ch")); // show that minus overrides the rest
 
         assertTrue(validator.isValidGenericTld("com"));
-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"com"});
+        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, "com");
         assertFalse(validator.isValidGenericTld("com"));
-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, new String[]{"xx"}); // change the minus list
+        DomainValidator.updateTLDOverride(ArrayType.GENERIC_MINUS, "xx"); // change the minus list
         assertTrue(validator.isValidGenericTld("com"));
     }
@@ -423,9 +356,9 @@
     @Test
     void testCannotUpdate() {
-        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"}); // OK
+        DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, "ch"); // OK
         DomainValidator dv = DomainValidator.getInstance();
         assertNotNull(dv);
         try {
-            DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, new String[]{"ch"});
+            DomainValidator.updateTLDOverride(ArrayType.GENERIC_PLUS, "ch");
             fail("Expected IllegalStateException");
         } catch (IllegalStateException ise) {
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java	(revision 18690)
@@ -35,9 +35,9 @@
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
@@ -102,5 +102,5 @@
         download(htmlFile, "http://www.iana.org/domains/root/db", timestamp);
 
-        try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(txtFile), StandardCharsets.UTF_8))) {
+        try (BufferedReader br = new BufferedReader(new InputStreamReader(Files.newInputStream(txtFile.toPath()), StandardCharsets.UTF_8))) {
             String line;
             final String header;
@@ -186,7 +186,5 @@
             Logging.warn("        // Taken from " + header);
         }
-        Iterator<Map.Entry<String, String>> it = map.entrySet().iterator();
-        while (it.hasNext()) {
-            Map.Entry<String, String> me = it.next();
+        for (Map.Entry<String, String> me : map.entrySet()) {
             Logging.warn("        \"" + me.getKey() + "\", // " + me.getValue());
         }
@@ -202,5 +200,5 @@
         final Pattern comment = Pattern.compile("\\s+<td>([^<]+)</td>");
 
-        try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8))) {
+        try (BufferedReader br = new BufferedReader(new InputStreamReader(Files.newInputStream(f.toPath()), StandardCharsets.UTF_8))) {
             String line;
             while ((line = br.readLine()) != null) {
@@ -301,5 +299,5 @@
             File rootCheck = new File(System.getProperty("java.io.tmpdir"), "tld_" + domain + ".html");
             download(rootCheck, tldurl, 0L);
-            in = new BufferedReader(new InputStreamReader(new FileInputStream(rootCheck), StandardCharsets.UTF_8));
+            in = new BufferedReader(new InputStreamReader(Files.newInputStream(rootCheck.toPath()), StandardCharsets.UTF_8));
             String inputLine;
             while ((inputLine = in.readLine()) != null) {
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java	(revision 18690)
@@ -17,7 +17,7 @@
 package org.openstreetmap.josm.data.validation.routines;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import org.junit.jupiter.api.BeforeEach;
@@ -172,10 +172,10 @@
             return; // Cannot run the test
         }
-        assertTrue("xn--d1abbgf6aiiy.xn--p1ai should validate", validator.isValid("someone@xn--d1abbgf6aiiy.xn--p1ai"));
-        assertTrue("президент.рф should validate", validator.isValid("someone@президент.рф"));
-        assertTrue("www.b\u00fccher.ch should validate", validator.isValid("someone@www.b\u00fccher.ch"));
-        assertFalse("www.\uFFFD.ch FFFD should fail", validator.isValid("someone@www.\uFFFD.ch"));
-        assertTrue("www.b\u00fccher.ch should validate", validator.isValid("someone@www.b\u00fccher.ch"));
-        assertFalse("www.\uFFFD.ch FFFD should fail", validator.isValid("someone@www.\uFFFD.ch"));
+        assertTrue(validator.isValid("someone@xn--d1abbgf6aiiy.xn--p1ai"), "xn--d1abbgf6aiiy.xn--p1ai should validate");
+        assertTrue(validator.isValid("someone@президент.рф"), "президент.рф should validate");
+        assertTrue(validator.isValid("someone@www.b\u00fccher.ch"), "www.b\u00fccher.ch should validate");
+        assertFalse(validator.isValid("someone@www.\uFFFD.ch"), "www.\uFFFD.ch FFFD should fail");
+        assertTrue(validator.isValid("someone@www.b\u00fccher.ch"), "www.b\u00fccher.ch should validate");
+        assertFalse(validator.isValid("someone@www.\uFFFD.ch"), "www.\uFFFD.ch FFFD should fail");
     }
 
@@ -217,7 +217,7 @@
     void testEmailWithControlChars() {
         for (char c = 0; c < 32; c++) {
-            assertFalse("Test control char " + ((int) c), validator.isValid("foo" + c + "bar@domain.com"));
+            assertFalse(validator.isValid("foo" + c + "bar@domain.com"), "Test control char " + ((int) c));
         }
-        assertFalse("Test control char 127", validator.isValid("foo" + ((char) 127) + "bar@domain.com"));
+        assertFalse(validator.isValid("foo" + ((char) 127) + "bar@domain.com"), "Test control char 127");
     }
 
@@ -234,21 +234,9 @@
 
        // Depends on the validator
-       assertTrue(
-             "@localhost.localdomain should be accepted but wasn't",
-             allowLocal.isValid("joe@localhost.localdomain")
-       );
-       assertTrue(
-             "@localhost should be accepted but wasn't",
-             allowLocal.isValid("joe@localhost")
-       );
-
-       assertFalse(
-             "@localhost.localdomain should be accepted but wasn't",
-             noLocal.isValid("joe@localhost.localdomain")
-       );
-       assertFalse(
-             "@localhost should be accepted but wasn't",
-             noLocal.isValid("joe@localhost")
-       );
+       assertTrue(allowLocal.isValid("joe@localhost.localdomain"), "@localhost.localdomain should be accepted but wasn't");
+       assertTrue(allowLocal.isValid("joe@localhost"), "@localhost should be accepted but wasn't");
+
+       assertFalse(noLocal.isValid("joe@localhost.localdomain"), "@localhost.localdomain should be accepted but wasn't");
+       assertFalse(noLocal.isValid("joe@localhost"), "@localhost should be accepted but wasn't");
     }
 
@@ -259,16 +247,7 @@
     @Test
     void testEmailWithSlashes() {
-       assertTrue(
-             "/ and ! valid in username",
-             validator.isValid("joe!/blow@apache.org")
-       );
-       assertFalse(
-             "/ not valid in domain",
-             validator.isValid("joe@ap/ache.org")
-       );
-       assertFalse(
-             "! not valid in domain",
-             validator.isValid("joe@apac!he.org")
-       );
+       assertTrue(validator.isValid("joe!/blow@apache.org"), "/ and ! valid in username");
+       assertFalse(validator.isValid("joe@ap/ache.org"), "/ not valid in domain");
+       assertFalse(validator.isValid("joe@apac!he.org"), "! not valid in domain");
     }
 
@@ -496,7 +475,7 @@
             String item = resultPair.item;
             if (resultPair.valid) {
-                assertTrue("Should be OK: " + item, validator.isValid(item));
+                assertTrue(validator.isValid(item), "Should be OK: " + item);
             } else {
-                assertFalse("Should fail: " + item, validator.isValid(item));
+                assertFalse(validator.isValid(item), "Should fail: " + item);
             }
         }
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/InetAddressValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/InetAddressValidatorTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/InetAddressValidatorTest.java	(revision 18690)
@@ -17,7 +17,7 @@
 package org.openstreetmap.josm.data.validation.routines;
 
-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.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import org.junit.jupiter.api.BeforeEach;
@@ -47,8 +47,8 @@
     void testInetAddressesFromTheWild() {
         // CHECKSTYLE.OFF: SingleSpaceSeparator
-        assertTrue("www.apache.org IP should be valid",   validator.isValid("140.211.11.130"));
-        assertTrue("www.l.google.com IP should be valid", validator.isValid("72.14.253.103"));
-        assertTrue("fsf.org IP should be valid",          validator.isValid("199.232.41.5"));
-        assertTrue("appscs.ign.com IP should be valid",   validator.isValid("216.35.123.87"));
+        assertTrue(validator.isValid("140.211.11.130"), "www.apache.org IP should be valid");
+        assertTrue(validator.isValid("72.14.253.103"), "www.l.google.com IP should be valid");
+        assertTrue(validator.isValid("199.232.41.5"), "fsf.org IP should be valid");
+        assertTrue(validator.isValid("216.35.123.87"), "appscs.ign.com IP should be valid");
         // CHECKSTYLE.ON: SingleSpaceSeparator
     }
@@ -59,6 +59,5 @@
     @Test
     void testVALIDATOR_335() {
-        assertTrue("2001:0438:FFFE:0000:0000:0000:0000:0A35 should be valid",
-                validator.isValid("2001:0438:FFFE:0000:0000:0000:0000:0A35"));
+        assertTrue(validator.isValid("2001:0438:FFFE:0000:0000:0000:0000:0A35"), "2001:0438:FFFE:0000:0000:0000:0000:0A35 should be valid");
     }
 
@@ -69,18 +68,18 @@
     void testInetAddressesByClass() {
         // CHECKSTYLE.OFF: SingleSpaceSeparator
-        assertTrue("class A IP should be valid",            validator.isValid("24.25.231.12"));
-        assertFalse("illegal class A IP should be invalid", validator.isValid("2.41.32.324"));
-
-        assertTrue("class B IP should be valid",            validator.isValid("135.14.44.12"));
-        assertFalse("illegal class B IP should be invalid", validator.isValid("154.123.441.123"));
-
-        assertTrue("class C IP should be valid",            validator.isValid("213.25.224.32"));
-        assertFalse("illegal class C IP should be invalid", validator.isValid("201.543.23.11"));
-
-        assertTrue("class D IP should be valid",            validator.isValid("229.35.159.6"));
-        assertFalse("illegal class D IP should be invalid", validator.isValid("231.54.11.987"));
-
-        assertTrue("class E IP should be valid",            validator.isValid("248.85.24.92"));
-        assertFalse("illegal class E IP should be invalid", validator.isValid("250.21.323.48"));
+        assertTrue(validator.isValid("24.25.231.12"), "class A IP should be valid");
+        assertFalse(validator.isValid("2.41.32.324"), "illegal class A IP should be invalid");
+
+        assertTrue(validator.isValid("135.14.44.12"), "class B IP should be valid");
+        assertFalse(validator.isValid("154.123.441.123"), "illegal class B IP should be invalid");
+
+        assertTrue(validator.isValid("213.25.224.32"), "class C IP should be valid");
+        assertFalse(validator.isValid("201.543.23.11"), "illegal class C IP should be invalid");
+
+        assertTrue(validator.isValid("229.35.159.6"), "class D IP should be valid");
+        assertFalse(validator.isValid("231.54.11.987"), "illegal class D IP should be invalid");
+
+        assertTrue(validator.isValid("248.85.24.92"), "class E IP should be valid");
+        assertFalse(validator.isValid("250.21.323.48"), "illegal class E IP should be invalid");
         // CHECKSTYLE.ON: SingleSpaceSeparator
     }
@@ -91,6 +90,6 @@
     @Test
     void testReservedInetAddresses() {
-        assertTrue("localhost IP should be valid", validator.isValid("127.0.0.1"));
-        assertTrue("broadcast IP should be valid", validator.isValid("255.255.255.255"));
+        assertTrue(validator.isValid("127.0.0.1"), "localhost IP should be valid");
+        assertTrue(validator.isValid("255.255.255.255"), "broadcast IP should be valid");
     }
 
@@ -101,8 +100,8 @@
     void testBrokenInetAddresses() {
         // CHECKSTYLE.OFF: SingleSpaceSeparator
-        assertFalse("IP with characters should be invalid",     validator.isValid("124.14.32.abc"));
-        assertFalse("IP with leading zeroes should be invalid", validator.isValid("124.14.32.01"));
-        assertFalse("IP with three groups should be invalid",   validator.isValid("23.64.12"));
-        assertFalse("IP with five groups should be invalid",    validator.isValid("26.34.23.77.234"));
+        assertFalse(validator.isValid("124.14.32.abc"), "IP with characters should be invalid");
+        assertFalse(validator.isValid("124.14.32.01"), "IP with leading zeroes should be invalid");
+        assertFalse(validator.isValid("23.64.12"), "IP with three groups should be invalid");
+        assertFalse(validator.isValid("26.34.23.77.234"), "IP with five groups should be invalid");
         // CHECKSTYLE.ON: SingleSpaceSeparator
     }
@@ -121,500 +120,500 @@
         // The original Perl script contained a lot of duplicate tests.
         // I removed the duplicates I noticed, but there may be more.
-        assertFalse("IPV6 empty string should be invalid", validator.isValidInet6Address("")); // empty string
-        assertTrue("IPV6 ::1 should be valid", validator.isValidInet6Address("::1")); // loopback, compressed, non-routable
-        assertTrue("IPV6 :: should be valid", validator.isValidInet6Address("::")); // unspecified, compressed, non-routable
-        assertTrue("IPV6 0:0:0:0:0:0:0:1 should be valid", validator.isValidInet6Address("0:0:0:0:0:0:0:1")); // loopback, full
-        assertTrue("IPV6 0:0:0:0:0:0:0:0 should be valid", validator.isValidInet6Address("0:0:0:0:0:0:0:0")); // unspecified, full
-        assertTrue("IPV6 2001:DB8:0:0:8:800:200C:417A should be valid", validator.isValidInet6Address("2001:DB8:0:0:8:800:200C:417A")); // unicast, full
-        assertTrue("IPV6 FF01:0:0:0:0:0:0:101 should be valid", validator.isValidInet6Address("FF01:0:0:0:0:0:0:101")); // multicast, full
-        assertTrue("IPV6 2001:DB8::8:800:200C:417A should be valid", validator.isValidInet6Address("2001:DB8::8:800:200C:417A")); // unicast, compressed
-        assertTrue("IPV6 FF01::101 should be valid", validator.isValidInet6Address("FF01::101")); // multicast, compressed
-        assertFalse("IPV6 2001:DB8:0:0:8:800:200C:417A:221 should be invalid", validator.isValidInet6Address("2001:DB8:0:0:8:800:200C:417A:221")); // unicast, full
-        assertFalse("IPV6 FF01::101::2 should be invalid", validator.isValidInet6Address("FF01::101::2")); // multicast, compressed
-        assertTrue("IPV6 fe80::217:f2ff:fe07:ed62 should be valid", validator.isValidInet6Address("fe80::217:f2ff:fe07:ed62"));
-        assertTrue("IPV6 2001:0000:1234:0000:0000:C1C0:ABCD:0876 should be valid", validator.isValidInet6Address("2001:0000:1234:0000:0000:C1C0:ABCD:0876"));
-        assertTrue("IPV6 3ffe:0b00:0000:0000:0001:0000:0000:000a should be valid", validator.isValidInet6Address("3ffe:0b00:0000:0000:0001:0000:0000:000a"));
-        assertTrue("IPV6 FF02:0000:0000:0000:0000:0000:0000:0001 should be valid", validator.isValidInet6Address("FF02:0000:0000:0000:0000:0000:0000:0001"));
-        assertTrue("IPV6 0000:0000:0000:0000:0000:0000:0000:0001 should be valid", validator.isValidInet6Address("0000:0000:0000:0000:0000:0000:0000:0001"));
-        assertTrue("IPV6 0000:0000:0000:0000:0000:0000:0000:0000 should be valid", validator.isValidInet6Address("0000:0000:0000:0000:0000:0000:0000:0000"));
-        assertFalse("IPV6 02001:0000:1234:0000:0000:C1C0:ABCD:0876 should be invalid", validator.isValidInet6Address("02001:0000:1234:0000:0000:C1C0:ABCD:0876")); // extra 0 not allowed!
-        assertFalse("IPV6 2001:0000:1234:0000:00001:C1C0:ABCD:0876 should be invalid", validator.isValidInet6Address("2001:0000:1234:0000:00001:C1C0:ABCD:0876")); // extra 0 not allowed!
-        assertFalse("IPV6 2001:0000:1234:0000:0000:C1C0:ABCD:0876 0 should be invalid", validator.isValidInet6Address("2001:0000:1234:0000:0000:C1C0:ABCD:0876 0")); // junk after valid address
-        assertFalse("IPV6 2001:0000:1234: 0000:0000:C1C0:ABCD:0876 should be invalid", validator.isValidInet6Address("2001:0000:1234: 0000:0000:C1C0:ABCD:0876")); // internal space
-        assertFalse("IPV6 3ffe:0b00:0000:0001:0000:0000:000a should be invalid", validator.isValidInet6Address("3ffe:0b00:0000:0001:0000:0000:000a")); // seven segments
-        assertFalse("IPV6 FF02:0000:0000:0000:0000:0000:0000:0000:0001 should be invalid", validator.isValidInet6Address("FF02:0000:0000:0000:0000:0000:0000:0000:0001")); // nine segments
-        assertFalse("IPV6 3ffe:b00::1::a should be invalid", validator.isValidInet6Address("3ffe:b00::1::a")); // double "::"
-        assertFalse("IPV6 ::1111:2222:3333:4444:5555:6666:: should be invalid", validator.isValidInet6Address("::1111:2222:3333:4444:5555:6666::")); // double "::"
-        assertTrue("IPV6 2::10 should be valid", validator.isValidInet6Address("2::10"));
-        assertTrue("IPV6 ff02::1 should be valid", validator.isValidInet6Address("ff02::1"));
-        assertTrue("IPV6 fe80:: should be valid", validator.isValidInet6Address("fe80::"));
-        assertTrue("IPV6 2002:: should be valid", validator.isValidInet6Address("2002::"));
-        assertTrue("IPV6 2001:db8:: should be valid", validator.isValidInet6Address("2001:db8::"));
-        assertTrue("IPV6 2001:0db8:1234:: should be valid", validator.isValidInet6Address("2001:0db8:1234::"));
-        assertTrue("IPV6 ::ffff:0:0 should be valid", validator.isValidInet6Address("::ffff:0:0"));
-        assertTrue("IPV6 1:2:3:4:5:6:7:8 should be valid", validator.isValidInet6Address("1:2:3:4:5:6:7:8"));
-        assertTrue("IPV6 1:2:3:4:5:6::8 should be valid", validator.isValidInet6Address("1:2:3:4:5:6::8"));
-        assertTrue("IPV6 1:2:3:4:5::8 should be valid", validator.isValidInet6Address("1:2:3:4:5::8"));
-        assertTrue("IPV6 1:2:3:4::8 should be valid", validator.isValidInet6Address("1:2:3:4::8"));
-        assertTrue("IPV6 1:2:3::8 should be valid", validator.isValidInet6Address("1:2:3::8"));
-        assertTrue("IPV6 1:2::8 should be valid", validator.isValidInet6Address("1:2::8"));
-        assertTrue("IPV6 1::8 should be valid", validator.isValidInet6Address("1::8"));
-        assertTrue("IPV6 1::2:3:4:5:6:7 should be valid", validator.isValidInet6Address("1::2:3:4:5:6:7"));
-        assertTrue("IPV6 1::2:3:4:5:6 should be valid", validator.isValidInet6Address("1::2:3:4:5:6"));
-        assertTrue("IPV6 1::2:3:4:5 should be valid", validator.isValidInet6Address("1::2:3:4:5"));
-        assertTrue("IPV6 1::2:3:4 should be valid", validator.isValidInet6Address("1::2:3:4"));
-        assertTrue("IPV6 1::2:3 should be valid", validator.isValidInet6Address("1::2:3"));
-        assertTrue("IPV6 ::2:3:4:5:6:7:8 should be valid", validator.isValidInet6Address("::2:3:4:5:6:7:8"));
-        assertTrue("IPV6 ::2:3:4:5:6:7 should be valid", validator.isValidInet6Address("::2:3:4:5:6:7"));
-        assertTrue("IPV6 ::2:3:4:5:6 should be valid", validator.isValidInet6Address("::2:3:4:5:6"));
-        assertTrue("IPV6 ::2:3:4:5 should be valid", validator.isValidInet6Address("::2:3:4:5"));
-        assertTrue("IPV6 ::2:3:4 should be valid", validator.isValidInet6Address("::2:3:4"));
-        assertTrue("IPV6 ::2:3 should be valid", validator.isValidInet6Address("::2:3"));
-        assertTrue("IPV6 ::8 should be valid", validator.isValidInet6Address("::8"));
-        assertTrue("IPV6 1:2:3:4:5:6:: should be valid", validator.isValidInet6Address("1:2:3:4:5:6::"));
-        assertTrue("IPV6 1:2:3:4:5:: should be valid", validator.isValidInet6Address("1:2:3:4:5::"));
-        assertTrue("IPV6 1:2:3:4:: should be valid", validator.isValidInet6Address("1:2:3:4::"));
-        assertTrue("IPV6 1:2:3:: should be valid", validator.isValidInet6Address("1:2:3::"));
-        assertTrue("IPV6 1:2:: should be valid", validator.isValidInet6Address("1:2::"));
-        assertTrue("IPV6 1:: should be valid", validator.isValidInet6Address("1::"));
-        assertTrue("IPV6 1:2:3:4:5::7:8 should be valid", validator.isValidInet6Address("1:2:3:4:5::7:8"));
-        assertFalse("IPV6 1:2:3::4:5::7:8 should be invalid", validator.isValidInet6Address("1:2:3::4:5::7:8")); // Double "::"
-        assertFalse("IPV6 12345::6:7:8 should be invalid", validator.isValidInet6Address("12345::6:7:8"));
-        assertTrue("IPV6 1:2:3:4::7:8 should be valid", validator.isValidInet6Address("1:2:3:4::7:8"));
-        assertTrue("IPV6 1:2:3::7:8 should be valid", validator.isValidInet6Address("1:2:3::7:8"));
-        assertTrue("IPV6 1:2::7:8 should be valid", validator.isValidInet6Address("1:2::7:8"));
-        assertTrue("IPV6 1::7:8 should be valid", validator.isValidInet6Address("1::7:8"));
+        assertFalse(validator.isValidInet6Address(""), "IPV6 empty string should be invalid"); // empty string
+        assertTrue(validator.isValidInet6Address("::1"), "IPV6 ::1 should be valid"); // loopback, compressed, non-routable
+        assertTrue(validator.isValidInet6Address("::"), "IPV6 :: should be valid"); // unspecified, compressed, non-routable
+        assertTrue(validator.isValidInet6Address("0:0:0:0:0:0:0:1"), "IPV6 0:0:0:0:0:0:0:1 should be valid"); // loopback, full
+        assertTrue(validator.isValidInet6Address("0:0:0:0:0:0:0:0"), "IPV6 0:0:0:0:0:0:0:0 should be valid"); // unspecified, full
+        assertTrue(validator.isValidInet6Address("2001:DB8:0:0:8:800:200C:417A"), "IPV6 2001:DB8:0:0:8:800:200C:417A should be valid"); // unicast, full
+        assertTrue(validator.isValidInet6Address("FF01:0:0:0:0:0:0:101"), "IPV6 FF01:0:0:0:0:0:0:101 should be valid"); // multicast, full
+        assertTrue(validator.isValidInet6Address("2001:DB8::8:800:200C:417A"), "IPV6 2001:DB8::8:800:200C:417A should be valid"); // unicast, compressed
+        assertTrue(validator.isValidInet6Address("FF01::101"), "IPV6 FF01::101 should be valid"); // multicast, compressed
+        assertFalse(validator.isValidInet6Address("2001:DB8:0:0:8:800:200C:417A:221"), "IPV6 2001:DB8:0:0:8:800:200C:417A:221 should be invalid"); // unicast, full
+        assertFalse(validator.isValidInet6Address("FF01::101::2"), "IPV6 FF01::101::2 should be invalid"); // multicast, compressed
+        assertTrue(validator.isValidInet6Address("fe80::217:f2ff:fe07:ed62"), "IPV6 fe80::217:f2ff:fe07:ed62 should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0000:1234:0000:0000:C1C0:ABCD:0876"), "IPV6 2001:0000:1234:0000:0000:C1C0:ABCD:0876 should be valid");
+        assertTrue(validator.isValidInet6Address("3ffe:0b00:0000:0000:0001:0000:0000:000a"), "IPV6 3ffe:0b00:0000:0000:0001:0000:0000:000a should be valid");
+        assertTrue(validator.isValidInet6Address("FF02:0000:0000:0000:0000:0000:0000:0001"), "IPV6 FF02:0000:0000:0000:0000:0000:0000:0001 should be valid");
+        assertTrue(validator.isValidInet6Address("0000:0000:0000:0000:0000:0000:0000:0001"), "IPV6 0000:0000:0000:0000:0000:0000:0000:0001 should be valid");
+        assertTrue(validator.isValidInet6Address("0000:0000:0000:0000:0000:0000:0000:0000"), "IPV6 0000:0000:0000:0000:0000:0000:0000:0000 should be valid");
+        assertFalse(validator.isValidInet6Address("02001:0000:1234:0000:0000:C1C0:ABCD:0876"), "IPV6 02001:0000:1234:0000:0000:C1C0:ABCD:0876 should be invalid"); // extra 0 not allowed!
+        assertFalse(validator.isValidInet6Address("2001:0000:1234:0000:00001:C1C0:ABCD:0876"), "IPV6 2001:0000:1234:0000:00001:C1C0:ABCD:0876 should be invalid"); // extra 0 not allowed!
+        assertFalse(validator.isValidInet6Address("2001:0000:1234:0000:0000:C1C0:ABCD:0876 0"), "IPV6 2001:0000:1234:0000:0000:C1C0:ABCD:0876 0 should be invalid"); // junk after valid address
+        assertFalse(validator.isValidInet6Address("2001:0000:1234: 0000:0000:C1C0:ABCD:0876"), "IPV6 2001:0000:1234: 0000:0000:C1C0:ABCD:0876 should be invalid"); // internal space
+        assertFalse(validator.isValidInet6Address("3ffe:0b00:0000:0001:0000:0000:000a"), "IPV6 3ffe:0b00:0000:0001:0000:0000:000a should be invalid"); // seven segments
+        assertFalse(validator.isValidInet6Address("FF02:0000:0000:0000:0000:0000:0000:0000:0001"), "IPV6 FF02:0000:0000:0000:0000:0000:0000:0000:0001 should be invalid"); // nine segments
+        assertFalse(validator.isValidInet6Address("3ffe:b00::1::a"), "IPV6 3ffe:b00::1::a should be invalid"); // double "::"
+        assertFalse(validator.isValidInet6Address("::1111:2222:3333:4444:5555:6666::"), "IPV6 ::1111:2222:3333:4444:5555:6666:: should be invalid"); // double "::"
+        assertTrue(validator.isValidInet6Address("2::10"), "IPV6 2::10 should be valid");
+        assertTrue(validator.isValidInet6Address("ff02::1"), "IPV6 ff02::1 should be valid");
+        assertTrue(validator.isValidInet6Address("fe80::"), "IPV6 fe80:: should be valid");
+        assertTrue(validator.isValidInet6Address("2002::"), "IPV6 2002:: should be valid");
+        assertTrue(validator.isValidInet6Address("2001:db8::"), "IPV6 2001:db8:: should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0db8:1234::"), "IPV6 2001:0db8:1234:: should be valid");
+        assertTrue(validator.isValidInet6Address("::ffff:0:0"), "IPV6 ::ffff:0:0 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4:5:6:7:8"), "IPV6 1:2:3:4:5:6:7:8 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4:5:6::8"), "IPV6 1:2:3:4:5:6::8 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4:5::8"), "IPV6 1:2:3:4:5::8 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4::8"), "IPV6 1:2:3:4::8 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3::8"), "IPV6 1:2:3::8 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2::8"), "IPV6 1:2::8 should be valid");
+        assertTrue(validator.isValidInet6Address("1::8"), "IPV6 1::8 should be valid");
+        assertTrue(validator.isValidInet6Address("1::2:3:4:5:6:7"), "IPV6 1::2:3:4:5:6:7 should be valid");
+        assertTrue(validator.isValidInet6Address("1::2:3:4:5:6"), "IPV6 1::2:3:4:5:6 should be valid");
+        assertTrue(validator.isValidInet6Address("1::2:3:4:5"), "IPV6 1::2:3:4:5 should be valid");
+        assertTrue(validator.isValidInet6Address("1::2:3:4"), "IPV6 1::2:3:4 should be valid");
+        assertTrue(validator.isValidInet6Address("1::2:3"), "IPV6 1::2:3 should be valid");
+        assertTrue(validator.isValidInet6Address("::2:3:4:5:6:7:8"), "IPV6 ::2:3:4:5:6:7:8 should be valid");
+        assertTrue(validator.isValidInet6Address("::2:3:4:5:6:7"), "IPV6 ::2:3:4:5:6:7 should be valid");
+        assertTrue(validator.isValidInet6Address("::2:3:4:5:6"), "IPV6 ::2:3:4:5:6 should be valid");
+        assertTrue(validator.isValidInet6Address("::2:3:4:5"), "IPV6 ::2:3:4:5 should be valid");
+        assertTrue(validator.isValidInet6Address("::2:3:4"), "IPV6 ::2:3:4 should be valid");
+        assertTrue(validator.isValidInet6Address("::2:3"), "IPV6 ::2:3 should be valid");
+        assertTrue(validator.isValidInet6Address("::8"), "IPV6 ::8 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4:5:6::"), "IPV6 1:2:3:4:5:6:: should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4:5::"), "IPV6 1:2:3:4:5:: should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4::"), "IPV6 1:2:3:4:: should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3::"), "IPV6 1:2:3:: should be valid");
+        assertTrue(validator.isValidInet6Address("1:2::"), "IPV6 1:2:: should be valid");
+        assertTrue(validator.isValidInet6Address("1::"), "IPV6 1:: should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4:5::7:8"), "IPV6 1:2:3:4:5::7:8 should be valid");
+        assertFalse(validator.isValidInet6Address("1:2:3::4:5::7:8"), "IPV6 1:2:3::4:5::7:8 should be invalid"); // Double "::"
+        assertFalse(validator.isValidInet6Address("12345::6:7:8"), "IPV6 12345::6:7:8 should be invalid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4::7:8"), "IPV6 1:2:3:4::7:8 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3::7:8"), "IPV6 1:2:3::7:8 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2::7:8"), "IPV6 1:2::7:8 should be valid");
+        assertTrue(validator.isValidInet6Address("1::7:8"), "IPV6 1::7:8 should be valid");
         // IPv4 addresses as dotted-quads
-        assertTrue("IPV6 1:2:3:4:5:6:1.2.3.4 should be valid", validator.isValidInet6Address("1:2:3:4:5:6:1.2.3.4"));
-        assertTrue("IPV6 1:2:3:4:5::1.2.3.4 should be valid", validator.isValidInet6Address("1:2:3:4:5::1.2.3.4"));
-        assertTrue("IPV6 1:2:3:4::1.2.3.4 should be valid", validator.isValidInet6Address("1:2:3:4::1.2.3.4"));
-        assertTrue("IPV6 1:2:3::1.2.3.4 should be valid", validator.isValidInet6Address("1:2:3::1.2.3.4"));
-        assertTrue("IPV6 1:2::1.2.3.4 should be valid", validator.isValidInet6Address("1:2::1.2.3.4"));
-        assertTrue("IPV6 1::1.2.3.4 should be valid", validator.isValidInet6Address("1::1.2.3.4"));
-        assertTrue("IPV6 1:2:3:4::5:1.2.3.4 should be valid", validator.isValidInet6Address("1:2:3:4::5:1.2.3.4"));
-        assertTrue("IPV6 1:2:3::5:1.2.3.4 should be valid", validator.isValidInet6Address("1:2:3::5:1.2.3.4"));
-        assertTrue("IPV6 1:2::5:1.2.3.4 should be valid", validator.isValidInet6Address("1:2::5:1.2.3.4"));
-        assertTrue("IPV6 1::5:1.2.3.4 should be valid", validator.isValidInet6Address("1::5:1.2.3.4"));
-        assertTrue("IPV6 1::5:11.22.33.44 should be valid", validator.isValidInet6Address("1::5:11.22.33.44"));
-        assertFalse("IPV6 1::5:400.2.3.4 should be invalid", validator.isValidInet6Address("1::5:400.2.3.4"));
-        assertFalse("IPV6 1::5:260.2.3.4 should be invalid", validator.isValidInet6Address("1::5:260.2.3.4"));
-        assertFalse("IPV6 1::5:256.2.3.4 should be invalid", validator.isValidInet6Address("1::5:256.2.3.4"));
-        assertFalse("IPV6 1::5:1.256.3.4 should be invalid", validator.isValidInet6Address("1::5:1.256.3.4"));
-        assertFalse("IPV6 1::5:1.2.256.4 should be invalid", validator.isValidInet6Address("1::5:1.2.256.4"));
-        assertFalse("IPV6 1::5:1.2.3.256 should be invalid", validator.isValidInet6Address("1::5:1.2.3.256"));
-        assertFalse("IPV6 1::5:300.2.3.4 should be invalid", validator.isValidInet6Address("1::5:300.2.3.4"));
-        assertFalse("IPV6 1::5:1.300.3.4 should be invalid", validator.isValidInet6Address("1::5:1.300.3.4"));
-        assertFalse("IPV6 1::5:1.2.300.4 should be invalid", validator.isValidInet6Address("1::5:1.2.300.4"));
-        assertFalse("IPV6 1::5:1.2.3.300 should be invalid", validator.isValidInet6Address("1::5:1.2.3.300"));
-        assertFalse("IPV6 1::5:900.2.3.4 should be invalid", validator.isValidInet6Address("1::5:900.2.3.4"));
-        assertFalse("IPV6 1::5:1.900.3.4 should be invalid", validator.isValidInet6Address("1::5:1.900.3.4"));
-        assertFalse("IPV6 1::5:1.2.900.4 should be invalid", validator.isValidInet6Address("1::5:1.2.900.4"));
-        assertFalse("IPV6 1::5:1.2.3.900 should be invalid", validator.isValidInet6Address("1::5:1.2.3.900"));
-        assertFalse("IPV6 1::5:300.300.300.300 should be invalid", validator.isValidInet6Address("1::5:300.300.300.300"));
-        assertFalse("IPV6 1::5:3000.30.30.30 should be invalid", validator.isValidInet6Address("1::5:3000.30.30.30"));
-        assertFalse("IPV6 1::400.2.3.4 should be invalid", validator.isValidInet6Address("1::400.2.3.4"));
-        assertFalse("IPV6 1::260.2.3.4 should be invalid", validator.isValidInet6Address("1::260.2.3.4"));
-        assertFalse("IPV6 1::256.2.3.4 should be invalid", validator.isValidInet6Address("1::256.2.3.4"));
-        assertFalse("IPV6 1::1.256.3.4 should be invalid", validator.isValidInet6Address("1::1.256.3.4"));
-        assertFalse("IPV6 1::1.2.256.4 should be invalid", validator.isValidInet6Address("1::1.2.256.4"));
-        assertFalse("IPV6 1::1.2.3.256 should be invalid", validator.isValidInet6Address("1::1.2.3.256"));
-        assertFalse("IPV6 1::300.2.3.4 should be invalid", validator.isValidInet6Address("1::300.2.3.4"));
-        assertFalse("IPV6 1::1.300.3.4 should be invalid", validator.isValidInet6Address("1::1.300.3.4"));
-        assertFalse("IPV6 1::1.2.300.4 should be invalid", validator.isValidInet6Address("1::1.2.300.4"));
-        assertFalse("IPV6 1::1.2.3.300 should be invalid", validator.isValidInet6Address("1::1.2.3.300"));
-        assertFalse("IPV6 1::900.2.3.4 should be invalid", validator.isValidInet6Address("1::900.2.3.4"));
-        assertFalse("IPV6 1::1.900.3.4 should be invalid", validator.isValidInet6Address("1::1.900.3.4"));
-        assertFalse("IPV6 1::1.2.900.4 should be invalid", validator.isValidInet6Address("1::1.2.900.4"));
-        assertFalse("IPV6 1::1.2.3.900 should be invalid", validator.isValidInet6Address("1::1.2.3.900"));
-        assertFalse("IPV6 1::300.300.300.300 should be invalid", validator.isValidInet6Address("1::300.300.300.300"));
-        assertFalse("IPV6 1::3000.30.30.30 should be invalid", validator.isValidInet6Address("1::3000.30.30.30"));
-        assertFalse("IPV6 ::400.2.3.4 should be invalid", validator.isValidInet6Address("::400.2.3.4"));
-        assertFalse("IPV6 ::260.2.3.4 should be invalid", validator.isValidInet6Address("::260.2.3.4"));
-        assertFalse("IPV6 ::256.2.3.4 should be invalid", validator.isValidInet6Address("::256.2.3.4"));
-        assertFalse("IPV6 ::1.256.3.4 should be invalid", validator.isValidInet6Address("::1.256.3.4"));
-        assertFalse("IPV6 ::1.2.256.4 should be invalid", validator.isValidInet6Address("::1.2.256.4"));
-        assertFalse("IPV6 ::1.2.3.256 should be invalid", validator.isValidInet6Address("::1.2.3.256"));
-        assertFalse("IPV6 ::300.2.3.4 should be invalid", validator.isValidInet6Address("::300.2.3.4"));
-        assertFalse("IPV6 ::1.300.3.4 should be invalid", validator.isValidInet6Address("::1.300.3.4"));
-        assertFalse("IPV6 ::1.2.300.4 should be invalid", validator.isValidInet6Address("::1.2.300.4"));
-        assertFalse("IPV6 ::1.2.3.300 should be invalid", validator.isValidInet6Address("::1.2.3.300"));
-        assertFalse("IPV6 ::900.2.3.4 should be invalid", validator.isValidInet6Address("::900.2.3.4"));
-        assertFalse("IPV6 ::1.900.3.4 should be invalid", validator.isValidInet6Address("::1.900.3.4"));
-        assertFalse("IPV6 ::1.2.900.4 should be invalid", validator.isValidInet6Address("::1.2.900.4"));
-        assertFalse("IPV6 ::1.2.3.900 should be invalid", validator.isValidInet6Address("::1.2.3.900"));
-        assertFalse("IPV6 ::300.300.300.300 should be invalid", validator.isValidInet6Address("::300.300.300.300"));
-        assertFalse("IPV6 ::3000.30.30.30 should be invalid", validator.isValidInet6Address("::3000.30.30.30"));
-        assertTrue("IPV6 fe80::217:f2ff:254.7.237.98 should be valid", validator.isValidInet6Address("fe80::217:f2ff:254.7.237.98"));
-        assertTrue("IPV6 ::ffff:192.168.1.26 should be valid", validator.isValidInet6Address("::ffff:192.168.1.26"));
-        assertFalse("IPV6 2001:1:1:1:1:1:255Z255X255Y255 should be invalid", validator.isValidInet6Address("2001:1:1:1:1:1:255Z255X255Y255")); // garbage instead of "." in IPv4
-        assertFalse("IPV6 ::ffff:192x168.1.26 should be invalid", validator.isValidInet6Address("::ffff:192x168.1.26")); // ditto
-        assertTrue("IPV6 ::ffff:192.168.1.1 should be valid", validator.isValidInet6Address("::ffff:192.168.1.1"));
-        assertTrue("IPV6 0:0:0:0:0:0:13.1.68.3 should be valid", validator.isValidInet6Address("0:0:0:0:0:0:13.1.68.3")); // IPv4-compatible IPv6 address, full, deprecated
-        assertTrue("IPV6 0:0:0:0:0:FFFF:129.144.52.38 should be valid", validator.isValidInet6Address("0:0:0:0:0:FFFF:129.144.52.38")); // IPv4-mapped IPv6 address, full
-        assertTrue("IPV6 ::13.1.68.3 should be valid", validator.isValidInet6Address("::13.1.68.3")); // IPv4-compatible IPv6 address, compressed, deprecated
-        assertTrue("IPV6 ::FFFF:129.144.52.38 should be valid", validator.isValidInet6Address("::FFFF:129.144.52.38")); // IPv4-mapped IPv6 address, compressed
-        assertTrue("IPV6 fe80:0:0:0:204:61ff:254.157.241.86 should be valid", validator.isValidInet6Address("fe80:0:0:0:204:61ff:254.157.241.86"));
-        assertTrue("IPV6 fe80::204:61ff:254.157.241.86 should be valid", validator.isValidInet6Address("fe80::204:61ff:254.157.241.86"));
-        assertTrue("IPV6 ::ffff:12.34.56.78 should be valid", validator.isValidInet6Address("::ffff:12.34.56.78"));
-        assertFalse("IPV6 ::ffff:2.3.4 should be invalid", validator.isValidInet6Address("::ffff:2.3.4"));
-        assertFalse("IPV6 ::ffff:257.1.2.3 should be invalid", validator.isValidInet6Address("::ffff:257.1.2.3"));
-        assertFalse("IPV6 1.2.3.4 should be invalid", validator.isValidInet6Address("1.2.3.4"));
-        assertFalse("IPV6 1.2.3.4:1111:2222:3333:4444::5555 should be invalid", validator.isValidInet6Address("1.2.3.4:1111:2222:3333:4444::5555"));
-        assertFalse("IPV6 1.2.3.4:1111:2222:3333::5555 should be invalid", validator.isValidInet6Address("1.2.3.4:1111:2222:3333::5555"));
-        assertFalse("IPV6 1.2.3.4:1111:2222::5555 should be invalid", validator.isValidInet6Address("1.2.3.4:1111:2222::5555"));
-        assertFalse("IPV6 1.2.3.4:1111::5555 should be invalid", validator.isValidInet6Address("1.2.3.4:1111::5555"));
-        assertFalse("IPV6 1.2.3.4::5555 should be invalid", validator.isValidInet6Address("1.2.3.4::5555"));
-        assertFalse("IPV6 1.2.3.4:: should be invalid", validator.isValidInet6Address("1.2.3.4::"));
+        assertTrue(validator.isValidInet6Address("1:2:3:4:5:6:1.2.3.4"), "IPV6 1:2:3:4:5:6:1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4:5::1.2.3.4"), "IPV6 1:2:3:4:5::1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4::1.2.3.4"), "IPV6 1:2:3:4::1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3::1.2.3.4"), "IPV6 1:2:3::1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2::1.2.3.4"), "IPV6 1:2::1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1::1.2.3.4"), "IPV6 1::1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3:4::5:1.2.3.4"), "IPV6 1:2:3:4::5:1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2:3::5:1.2.3.4"), "IPV6 1:2:3::5:1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1:2::5:1.2.3.4"), "IPV6 1:2::5:1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1::5:1.2.3.4"), "IPV6 1::5:1.2.3.4 should be valid");
+        assertTrue(validator.isValidInet6Address("1::5:11.22.33.44"), "IPV6 1::5:11.22.33.44 should be valid");
+        assertFalse(validator.isValidInet6Address("1::5:400.2.3.4"), "IPV6 1::5:400.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:260.2.3.4"), "IPV6 1::5:260.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:256.2.3.4"), "IPV6 1::5:256.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.256.3.4"), "IPV6 1::5:1.256.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.2.256.4"), "IPV6 1::5:1.2.256.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.2.3.256"), "IPV6 1::5:1.2.3.256 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:300.2.3.4"), "IPV6 1::5:300.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.300.3.4"), "IPV6 1::5:1.300.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.2.300.4"), "IPV6 1::5:1.2.300.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.2.3.300"), "IPV6 1::5:1.2.3.300 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:900.2.3.4"), "IPV6 1::5:900.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.900.3.4"), "IPV6 1::5:1.900.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.2.900.4"), "IPV6 1::5:1.2.900.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:1.2.3.900"), "IPV6 1::5:1.2.3.900 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:300.300.300.300"), "IPV6 1::5:300.300.300.300 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::5:3000.30.30.30"), "IPV6 1::5:3000.30.30.30 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::400.2.3.4"), "IPV6 1::400.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::260.2.3.4"), "IPV6 1::260.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::256.2.3.4"), "IPV6 1::256.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.256.3.4"), "IPV6 1::1.256.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.2.256.4"), "IPV6 1::1.2.256.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.2.3.256"), "IPV6 1::1.2.3.256 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::300.2.3.4"), "IPV6 1::300.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.300.3.4"), "IPV6 1::1.300.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.2.300.4"), "IPV6 1::1.2.300.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.2.3.300"), "IPV6 1::1.2.3.300 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::900.2.3.4"), "IPV6 1::900.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.900.3.4"), "IPV6 1::1.900.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.2.900.4"), "IPV6 1::1.2.900.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::1.2.3.900"), "IPV6 1::1.2.3.900 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::300.300.300.300"), "IPV6 1::300.300.300.300 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::3000.30.30.30"), "IPV6 1::3000.30.30.30 should be invalid");
+        assertFalse(validator.isValidInet6Address("::400.2.3.4"), "IPV6 ::400.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::260.2.3.4"), "IPV6 ::260.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::256.2.3.4"), "IPV6 ::256.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.256.3.4"), "IPV6 ::1.256.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.2.256.4"), "IPV6 ::1.2.256.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.2.3.256"), "IPV6 ::1.2.3.256 should be invalid");
+        assertFalse(validator.isValidInet6Address("::300.2.3.4"), "IPV6 ::300.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.300.3.4"), "IPV6 ::1.300.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.2.300.4"), "IPV6 ::1.2.300.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.2.3.300"), "IPV6 ::1.2.3.300 should be invalid");
+        assertFalse(validator.isValidInet6Address("::900.2.3.4"), "IPV6 ::900.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.900.3.4"), "IPV6 ::1.900.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.2.900.4"), "IPV6 ::1.2.900.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.2.3.900"), "IPV6 ::1.2.3.900 should be invalid");
+        assertFalse(validator.isValidInet6Address("::300.300.300.300"), "IPV6 ::300.300.300.300 should be invalid");
+        assertFalse(validator.isValidInet6Address("::3000.30.30.30"), "IPV6 ::3000.30.30.30 should be invalid");
+        assertTrue(validator.isValidInet6Address("fe80::217:f2ff:254.7.237.98"), "IPV6 fe80::217:f2ff:254.7.237.98 should be valid");
+        assertTrue(validator.isValidInet6Address("::ffff:192.168.1.26"), "IPV6 ::ffff:192.168.1.26 should be valid");
+        assertFalse(validator.isValidInet6Address("2001:1:1:1:1:1:255Z255X255Y255"), "IPV6 2001:1:1:1:1:1:255Z255X255Y255 should be invalid"); // garbage instead of "." in IPv4
+        assertFalse(validator.isValidInet6Address("::ffff:192x168.1.26"), "IPV6 ::ffff:192x168.1.26 should be invalid"); // ditto
+        assertTrue(validator.isValidInet6Address("::ffff:192.168.1.1"), "IPV6 ::ffff:192.168.1.1 should be valid");
+        assertTrue(validator.isValidInet6Address("0:0:0:0:0:0:13.1.68.3"), "IPV6 0:0:0:0:0:0:13.1.68.3 should be valid"); // IPv4-compatible IPv6 address, full, deprecated
+        assertTrue(validator.isValidInet6Address("0:0:0:0:0:FFFF:129.144.52.38"), "IPV6 0:0:0:0:0:FFFF:129.144.52.38 should be valid"); // IPv4-mapped IPv6 address, full
+        assertTrue(validator.isValidInet6Address("::13.1.68.3"), "IPV6 ::13.1.68.3 should be valid"); // IPv4-compatible IPv6 address, compressed, deprecated
+        assertTrue(validator.isValidInet6Address("::FFFF:129.144.52.38"), "IPV6 ::FFFF:129.144.52.38 should be valid"); // IPv4-mapped IPv6 address, compressed
+        assertTrue(validator.isValidInet6Address("fe80:0:0:0:204:61ff:254.157.241.86"), "IPV6 fe80:0:0:0:204:61ff:254.157.241.86 should be valid");
+        assertTrue(validator.isValidInet6Address("fe80::204:61ff:254.157.241.86"), "IPV6 fe80::204:61ff:254.157.241.86 should be valid");
+        assertTrue(validator.isValidInet6Address("::ffff:12.34.56.78"), "IPV6 ::ffff:12.34.56.78 should be valid");
+        assertFalse(validator.isValidInet6Address("::ffff:2.3.4"), "IPV6 ::ffff:2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::ffff:257.1.2.3"), "IPV6 ::ffff:257.1.2.3 should be invalid");
+        assertFalse(validator.isValidInet6Address("1.2.3.4"), "IPV6 1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1.2.3.4:1111:2222:3333:4444::5555"), "IPV6 1.2.3.4:1111:2222:3333:4444::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address("1.2.3.4:1111:2222:3333::5555"), "IPV6 1.2.3.4:1111:2222:3333::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address("1.2.3.4:1111:2222::5555"), "IPV6 1.2.3.4:1111:2222::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address("1.2.3.4:1111::5555"), "IPV6 1.2.3.4:1111::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address("1.2.3.4::5555"), "IPV6 1.2.3.4::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address("1.2.3.4::"), "IPV6 1.2.3.4:: should be invalid");
         // Testing IPv4 addresses represented as dotted-quads
         // Leading zeroes in IPv4 addresses not allowed: some systems treat the leading "0" in ".086" as the start of an octal number
         // Update: The BNF in RFC-3986 explicitly defines the dec-octet (for IPv4 addresses) not to have a leading zero
-        assertFalse("IPV6 fe80:0000:0000:0000:0204:61ff:254.157.241.086 should be invalid", validator.isValidInet6Address("fe80:0000:0000:0000:0204:61ff:254.157.241.086"));
-        assertTrue("IPV6 ::ffff:192.0.2.128 should be valid", validator.isValidInet6Address("::ffff:192.0.2.128")); // but this is OK, since there's a single digit
-        assertFalse("IPV6 XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:1.2.3.4 should be invalid", validator.isValidInet6Address("XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:00.00.00.00 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:00.00.00.00"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:000.000.000.000 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:000.000.000.000"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:256.256.256.256 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:256.256.256.256"));
-        assertTrue("IPV6 fe80:0000:0000:0000:0204:61ff:fe9d:f156 should be valid", validator.isValidInet6Address("fe80:0000:0000:0000:0204:61ff:fe9d:f156"));
-        assertTrue("IPV6 fe80:0:0:0:204:61ff:fe9d:f156 should be valid", validator.isValidInet6Address("fe80:0:0:0:204:61ff:fe9d:f156"));
-        assertTrue("IPV6 fe80::204:61ff:fe9d:f156 should be valid", validator.isValidInet6Address("fe80::204:61ff:fe9d:f156"));
-        assertFalse("IPV6 : should be invalid", validator.isValidInet6Address(":"));
-        assertTrue("IPV6 ::ffff:c000:280 should be valid", validator.isValidInet6Address("::ffff:c000:280"));
-        assertFalse("IPV6 1111:2222:3333:4444::5555: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444::5555:"));
-        assertFalse("IPV6 1111:2222:3333::5555: should be invalid", validator.isValidInet6Address("1111:2222:3333::5555:"));
-        assertFalse("IPV6 1111:2222::5555: should be invalid", validator.isValidInet6Address("1111:2222::5555:"));
-        assertFalse("IPV6 1111::5555: should be invalid", validator.isValidInet6Address("1111::5555:"));
-        assertFalse("IPV6 ::5555: should be invalid", validator.isValidInet6Address("::5555:"));
-        assertFalse("IPV6 ::: should be invalid", validator.isValidInet6Address(":::"));
-        assertFalse("IPV6 1111: should be invalid", validator.isValidInet6Address("1111:"));
-        assertFalse("IPV6 :1111:2222:3333:4444::5555 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444::5555"));
-        assertFalse("IPV6 :1111:2222:3333::5555 should be invalid", validator.isValidInet6Address(":1111:2222:3333::5555"));
-        assertFalse("IPV6 :1111:2222::5555 should be invalid", validator.isValidInet6Address(":1111:2222::5555"));
-        assertFalse("IPV6 :1111::5555 should be invalid", validator.isValidInet6Address(":1111::5555"));
-        assertFalse("IPV6 :::5555 should be invalid", validator.isValidInet6Address(":::5555"));
-        assertTrue("IPV6 2001:0db8:85a3:0000:0000:8a2e:0370:7334 should be valid", validator.isValidInet6Address("2001:0db8:85a3:0000:0000:8a2e:0370:7334"));
-        assertTrue("IPV6 2001:db8:85a3:0:0:8a2e:370:7334 should be valid", validator.isValidInet6Address("2001:db8:85a3:0:0:8a2e:370:7334"));
-        assertTrue("IPV6 2001:db8:85a3::8a2e:370:7334 should be valid", validator.isValidInet6Address("2001:db8:85a3::8a2e:370:7334"));
-        assertTrue("IPV6 2001:0db8:0000:0000:0000:0000:1428:57ab should be valid", validator.isValidInet6Address("2001:0db8:0000:0000:0000:0000:1428:57ab"));
-        assertTrue("IPV6 2001:0db8:0000:0000:0000::1428:57ab should be valid", validator.isValidInet6Address("2001:0db8:0000:0000:0000::1428:57ab"));
-        assertTrue("IPV6 2001:0db8:0:0:0:0:1428:57ab should be valid", validator.isValidInet6Address("2001:0db8:0:0:0:0:1428:57ab"));
-        assertTrue("IPV6 2001:0db8:0:0::1428:57ab should be valid", validator.isValidInet6Address("2001:0db8:0:0::1428:57ab"));
-        assertTrue("IPV6 2001:0db8::1428:57ab should be valid", validator.isValidInet6Address("2001:0db8::1428:57ab"));
-        assertTrue("IPV6 2001:db8::1428:57ab should be valid", validator.isValidInet6Address("2001:db8::1428:57ab"));
-        assertTrue("IPV6 ::ffff:0c22:384e should be valid", validator.isValidInet6Address("::ffff:0c22:384e"));
-        assertTrue("IPV6 2001:0db8:1234:0000:0000:0000:0000:0000 should be valid", validator.isValidInet6Address("2001:0db8:1234:0000:0000:0000:0000:0000"));
-        assertTrue("IPV6 2001:0db8:1234:ffff:ffff:ffff:ffff:ffff should be valid", validator.isValidInet6Address("2001:0db8:1234:ffff:ffff:ffff:ffff:ffff"));
-        assertTrue("IPV6 2001:db8:a::123 should be valid", validator.isValidInet6Address("2001:db8:a::123"));
-        assertFalse("IPV6 123 should be invalid", validator.isValidInet6Address("123"));
-        assertFalse("IPV6 ldkfj should be invalid", validator.isValidInet6Address("ldkfj"));
-        assertFalse("IPV6 2001::FFD3::57ab should be invalid", validator.isValidInet6Address("2001::FFD3::57ab"));
-        assertFalse("IPV6 2001:db8:85a3::8a2e:37023:7334 should be invalid", validator.isValidInet6Address("2001:db8:85a3::8a2e:37023:7334"));
-        assertFalse("IPV6 2001:db8:85a3::8a2e:370k:7334 should be invalid", validator.isValidInet6Address("2001:db8:85a3::8a2e:370k:7334"));
-        assertFalse("IPV6 1:2:3:4:5:6:7:8:9 should be invalid", validator.isValidInet6Address("1:2:3:4:5:6:7:8:9"));
-        assertFalse("IPV6 1::2::3 should be invalid", validator.isValidInet6Address("1::2::3"));
-        assertFalse("IPV6 1:::3:4:5 should be invalid", validator.isValidInet6Address("1:::3:4:5"));
-        assertFalse("IPV6 1:2:3::4:5:6:7:8:9 should be invalid", validator.isValidInet6Address("1:2:3::4:5:6:7:8:9"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555:6666:7777:8888 should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555:6666:7777:: should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777::"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555:6666:: should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666::"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555:: should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555::"));
-        assertTrue("IPV6 1111:2222:3333:4444:: should be valid", validator.isValidInet6Address("1111:2222:3333:4444::"));
-        assertTrue("IPV6 1111:2222:3333:: should be valid", validator.isValidInet6Address("1111:2222:3333::"));
-        assertTrue("IPV6 1111:2222:: should be valid", validator.isValidInet6Address("1111:2222::"));
-        assertTrue("IPV6 1111:: should be valid", validator.isValidInet6Address("1111::"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555:6666::8888 should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666::8888"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555::8888 should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555::8888"));
-        assertTrue("IPV6 1111:2222:3333:4444::8888 should be valid", validator.isValidInet6Address("1111:2222:3333:4444::8888"));
-        assertTrue("IPV6 1111:2222:3333::8888 should be valid", validator.isValidInet6Address("1111:2222:3333::8888"));
-        assertTrue("IPV6 1111:2222::8888 should be valid", validator.isValidInet6Address("1111:2222::8888"));
-        assertTrue("IPV6 1111::8888 should be valid", validator.isValidInet6Address("1111::8888"));
-        assertTrue("IPV6 ::8888 should be valid", validator.isValidInet6Address("::8888"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555::7777:8888 should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555::7777:8888"));
-        assertTrue("IPV6 1111:2222:3333:4444::7777:8888 should be valid", validator.isValidInet6Address("1111:2222:3333:4444::7777:8888"));
-        assertTrue("IPV6 1111:2222:3333::7777:8888 should be valid", validator.isValidInet6Address("1111:2222:3333::7777:8888"));
-        assertTrue("IPV6 1111:2222::7777:8888 should be valid", validator.isValidInet6Address("1111:2222::7777:8888"));
-        assertTrue("IPV6 1111::7777:8888 should be valid", validator.isValidInet6Address("1111::7777:8888"));
-        assertTrue("IPV6 ::7777:8888 should be valid", validator.isValidInet6Address("::7777:8888"));
-        assertTrue("IPV6 1111:2222:3333:4444::6666:7777:8888 should be valid", validator.isValidInet6Address("1111:2222:3333:4444::6666:7777:8888"));
-        assertTrue("IPV6 1111:2222:3333::6666:7777:8888 should be valid", validator.isValidInet6Address("1111:2222:3333::6666:7777:8888"));
-        assertTrue("IPV6 1111:2222::6666:7777:8888 should be valid", validator.isValidInet6Address("1111:2222::6666:7777:8888"));
-        assertTrue("IPV6 1111::6666:7777:8888 should be valid", validator.isValidInet6Address("1111::6666:7777:8888"));
-        assertTrue("IPV6 ::6666:7777:8888 should be valid", validator.isValidInet6Address("::6666:7777:8888"));
-        assertTrue("IPV6 1111:2222:3333::5555:6666:7777:8888 should be valid", validator.isValidInet6Address("1111:2222:3333::5555:6666:7777:8888"));
-        assertTrue("IPV6 1111:2222::5555:6666:7777:8888 should be valid", validator.isValidInet6Address("1111:2222::5555:6666:7777:8888"));
-        assertTrue("IPV6 1111::5555:6666:7777:8888 should be valid", validator.isValidInet6Address("1111::5555:6666:7777:8888"));
-        assertTrue("IPV6 ::5555:6666:7777:8888 should be valid", validator.isValidInet6Address("::5555:6666:7777:8888"));
-        assertTrue("IPV6 1111:2222::4444:5555:6666:7777:8888 should be valid", validator.isValidInet6Address("1111:2222::4444:5555:6666:7777:8888"));
-        assertTrue("IPV6 1111::4444:5555:6666:7777:8888 should be valid", validator.isValidInet6Address("1111::4444:5555:6666:7777:8888"));
-        assertTrue("IPV6 ::4444:5555:6666:7777:8888 should be valid", validator.isValidInet6Address("::4444:5555:6666:7777:8888"));
-        assertTrue("IPV6 1111::3333:4444:5555:6666:7777:8888 should be valid", validator.isValidInet6Address("1111::3333:4444:5555:6666:7777:8888"));
-        assertTrue("IPV6 ::3333:4444:5555:6666:7777:8888 should be valid", validator.isValidInet6Address("::3333:4444:5555:6666:7777:8888"));
-        assertTrue("IPV6 ::2222:3333:4444:5555:6666:7777:8888 should be valid", validator.isValidInet6Address("::2222:3333:4444:5555:6666:7777:8888"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:123.123.123.123"));
-        assertTrue("IPV6 1111:2222:3333:4444:5555::123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222:3333:4444:5555::123.123.123.123"));
-        assertTrue("IPV6 1111:2222:3333:4444::123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222:3333:4444::123.123.123.123"));
-        assertTrue("IPV6 1111:2222:3333::123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222:3333::123.123.123.123"));
-        assertTrue("IPV6 1111:2222::123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222::123.123.123.123"));
-        assertTrue("IPV6 1111::123.123.123.123 should be valid", validator.isValidInet6Address("1111::123.123.123.123"));
-        assertTrue("IPV6 ::123.123.123.123 should be valid", validator.isValidInet6Address("::123.123.123.123"));
-        assertTrue("IPV6 1111:2222:3333:4444::6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222:3333:4444::6666:123.123.123.123"));
-        assertTrue("IPV6 1111:2222:3333::6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222:3333::6666:123.123.123.123"));
-        assertTrue("IPV6 1111:2222::6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222::6666:123.123.123.123"));
-        assertTrue("IPV6 1111::6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111::6666:123.123.123.123"));
-        assertTrue("IPV6 ::6666:123.123.123.123 should be valid", validator.isValidInet6Address("::6666:123.123.123.123"));
-        assertTrue("IPV6 1111:2222:3333::5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222:3333::5555:6666:123.123.123.123"));
-        assertTrue("IPV6 1111:2222::5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222::5555:6666:123.123.123.123"));
-        assertTrue("IPV6 1111::5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111::5555:6666:123.123.123.123"));
-        assertTrue("IPV6 ::5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("::5555:6666:123.123.123.123"));
-        assertTrue("IPV6 1111:2222::4444:5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111:2222::4444:5555:6666:123.123.123.123"));
-        assertTrue("IPV6 1111::4444:5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111::4444:5555:6666:123.123.123.123"));
-        assertTrue("IPV6 ::4444:5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("::4444:5555:6666:123.123.123.123"));
-        assertTrue("IPV6 1111::3333:4444:5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("1111::3333:4444:5555:6666:123.123.123.123"));
-        assertTrue("IPV6 ::2222:3333:4444:5555:6666:123.123.123.123 should be valid", validator.isValidInet6Address("::2222:3333:4444:5555:6666:123.123.123.123"));
+        assertFalse(validator.isValidInet6Address("fe80:0000:0000:0000:0204:61ff:254.157.241.086"), "IPV6 fe80:0000:0000:0000:0204:61ff:254.157.241.086 should be invalid");
+        assertTrue(validator.isValidInet6Address("::ffff:192.0.2.128"), "IPV6 ::ffff:192.0.2.128 should be valid"); // but this is OK, since there's a single digit
+        assertFalse(validator.isValidInet6Address("XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:1.2.3.4"), "IPV6 XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:00.00.00.00"), "IPV6 1111:2222:3333:4444:5555:6666:00.00.00.00 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:000.000.000.000"), "IPV6 1111:2222:3333:4444:5555:6666:000.000.000.000 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:256.256.256.256"), "IPV6 1111:2222:3333:4444:5555:6666:256.256.256.256 should be invalid");
+        assertTrue(validator.isValidInet6Address("fe80:0000:0000:0000:0204:61ff:fe9d:f156"), "IPV6 fe80:0000:0000:0000:0204:61ff:fe9d:f156 should be valid");
+        assertTrue(validator.isValidInet6Address("fe80:0:0:0:204:61ff:fe9d:f156"), "IPV6 fe80:0:0:0:204:61ff:fe9d:f156 should be valid");
+        assertTrue(validator.isValidInet6Address("fe80::204:61ff:fe9d:f156"), "IPV6 fe80::204:61ff:fe9d:f156 should be valid");
+        assertFalse(validator.isValidInet6Address(":"), "IPV6 : should be invalid");
+        assertTrue(validator.isValidInet6Address("::ffff:c000:280"), "IPV6 ::ffff:c000:280 should be valid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444::5555:"), "IPV6 1111:2222:3333:4444::5555: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::5555:"), "IPV6 1111:2222:3333::5555: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::5555:"), "IPV6 1111:2222::5555: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::5555:"), "IPV6 1111::5555: should be invalid");
+        assertFalse(validator.isValidInet6Address("::5555:"), "IPV6 ::5555: should be invalid");
+        assertFalse(validator.isValidInet6Address(":::"), "IPV6 ::: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:"), "IPV6 1111: should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444::5555"), "IPV6 :1111:2222:3333:4444::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::5555"), "IPV6 :1111:2222:3333::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::5555"), "IPV6 :1111:2222::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::5555"), "IPV6 :1111::5555 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::5555"), "IPV6 :::5555 should be invalid");
+        assertTrue(validator.isValidInet6Address("2001:0db8:85a3:0000:0000:8a2e:0370:7334"), "IPV6 2001:0db8:85a3:0000:0000:8a2e:0370:7334 should be valid");
+        assertTrue(validator.isValidInet6Address("2001:db8:85a3:0:0:8a2e:370:7334"), "IPV6 2001:db8:85a3:0:0:8a2e:370:7334 should be valid");
+        assertTrue(validator.isValidInet6Address("2001:db8:85a3::8a2e:370:7334"), "IPV6 2001:db8:85a3::8a2e:370:7334 should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0db8:0000:0000:0000:0000:1428:57ab"), "IPV6 2001:0db8:0000:0000:0000:0000:1428:57ab should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0db8:0000:0000:0000::1428:57ab"), "IPV6 2001:0db8:0000:0000:0000::1428:57ab should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0db8:0:0:0:0:1428:57ab"), "IPV6 2001:0db8:0:0:0:0:1428:57ab should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0db8:0:0::1428:57ab"), "IPV6 2001:0db8:0:0::1428:57ab should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0db8::1428:57ab"), "IPV6 2001:0db8::1428:57ab should be valid");
+        assertTrue(validator.isValidInet6Address("2001:db8::1428:57ab"), "IPV6 2001:db8::1428:57ab should be valid");
+        assertTrue(validator.isValidInet6Address("::ffff:0c22:384e"), "IPV6 ::ffff:0c22:384e should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0db8:1234:0000:0000:0000:0000:0000"), "IPV6 2001:0db8:1234:0000:0000:0000:0000:0000 should be valid");
+        assertTrue(validator.isValidInet6Address("2001:0db8:1234:ffff:ffff:ffff:ffff:ffff"), "IPV6 2001:0db8:1234:ffff:ffff:ffff:ffff:ffff should be valid");
+        assertTrue(validator.isValidInet6Address("2001:db8:a::123"), "IPV6 2001:db8:a::123 should be valid");
+        assertFalse(validator.isValidInet6Address("123"), "IPV6 123 should be invalid");
+        assertFalse(validator.isValidInet6Address("ldkfj"), "IPV6 ldkfj should be invalid");
+        assertFalse(validator.isValidInet6Address("2001::FFD3::57ab"), "IPV6 2001::FFD3::57ab should be invalid");
+        assertFalse(validator.isValidInet6Address("2001:db8:85a3::8a2e:37023:7334"), "IPV6 2001:db8:85a3::8a2e:37023:7334 should be invalid");
+        assertFalse(validator.isValidInet6Address("2001:db8:85a3::8a2e:370k:7334"), "IPV6 2001:db8:85a3::8a2e:370k:7334 should be invalid");
+        assertFalse(validator.isValidInet6Address("1:2:3:4:5:6:7:8:9"), "IPV6 1:2:3:4:5:6:7:8:9 should be invalid");
+        assertFalse(validator.isValidInet6Address("1::2::3"), "IPV6 1::2::3 should be invalid");
+        assertFalse(validator.isValidInet6Address("1:::3:4:5"), "IPV6 1:::3:4:5 should be invalid");
+        assertFalse(validator.isValidInet6Address("1:2:3::4:5:6:7:8:9"), "IPV6 1:2:3::4:5:6:7:8:9 should be invalid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888"), "IPV6 1111:2222:3333:4444:5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777::"), "IPV6 1111:2222:3333:4444:5555:6666:7777:: should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666::"), "IPV6 1111:2222:3333:4444:5555:6666:: should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555::"), "IPV6 1111:2222:3333:4444:5555:: should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444::"), "IPV6 1111:2222:3333:4444:: should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333::"), "IPV6 1111:2222:3333:: should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::"), "IPV6 1111:2222:: should be valid");
+        assertTrue(validator.isValidInet6Address("1111::"), "IPV6 1111:: should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666::8888"), "IPV6 1111:2222:3333:4444:5555:6666::8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555::8888"), "IPV6 1111:2222:3333:4444:5555::8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444::8888"), "IPV6 1111:2222:3333:4444::8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333::8888"), "IPV6 1111:2222:3333::8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::8888"), "IPV6 1111:2222::8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::8888"), "IPV6 1111::8888 should be valid");
+        assertTrue(validator.isValidInet6Address("::8888"), "IPV6 ::8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555::7777:8888"), "IPV6 1111:2222:3333:4444:5555::7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444::7777:8888"), "IPV6 1111:2222:3333:4444::7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333::7777:8888"), "IPV6 1111:2222:3333::7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::7777:8888"), "IPV6 1111:2222::7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::7777:8888"), "IPV6 1111::7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("::7777:8888"), "IPV6 ::7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444::6666:7777:8888"), "IPV6 1111:2222:3333:4444::6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333::6666:7777:8888"), "IPV6 1111:2222:3333::6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::6666:7777:8888"), "IPV6 1111:2222::6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::6666:7777:8888"), "IPV6 1111::6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("::6666:7777:8888"), "IPV6 ::6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333::5555:6666:7777:8888"), "IPV6 1111:2222:3333::5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::5555:6666:7777:8888"), "IPV6 1111:2222::5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::5555:6666:7777:8888"), "IPV6 1111::5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("::5555:6666:7777:8888"), "IPV6 ::5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::4444:5555:6666:7777:8888"), "IPV6 1111:2222::4444:5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::4444:5555:6666:7777:8888"), "IPV6 1111::4444:5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("::4444:5555:6666:7777:8888"), "IPV6 ::4444:5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::3333:4444:5555:6666:7777:8888"), "IPV6 1111::3333:4444:5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("::3333:4444:5555:6666:7777:8888"), "IPV6 ::3333:4444:5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("::2222:3333:4444:5555:6666:7777:8888"), "IPV6 ::2222:3333:4444:5555:6666:7777:8888 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:123.123.123.123"), "IPV6 1111:2222:3333:4444:5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444:5555::123.123.123.123"), "IPV6 1111:2222:3333:4444:5555::123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444::123.123.123.123"), "IPV6 1111:2222:3333:4444::123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333::123.123.123.123"), "IPV6 1111:2222:3333::123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::123.123.123.123"), "IPV6 1111:2222::123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::123.123.123.123"), "IPV6 1111::123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("::123.123.123.123"), "IPV6 ::123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333:4444::6666:123.123.123.123"), "IPV6 1111:2222:3333:4444::6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333::6666:123.123.123.123"), "IPV6 1111:2222:3333::6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::6666:123.123.123.123"), "IPV6 1111:2222::6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::6666:123.123.123.123"), "IPV6 1111::6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("::6666:123.123.123.123"), "IPV6 ::6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222:3333::5555:6666:123.123.123.123"), "IPV6 1111:2222:3333::5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::5555:6666:123.123.123.123"), "IPV6 1111:2222::5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::5555:6666:123.123.123.123"), "IPV6 1111::5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("::5555:6666:123.123.123.123"), "IPV6 ::5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111:2222::4444:5555:6666:123.123.123.123"), "IPV6 1111:2222::4444:5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::4444:5555:6666:123.123.123.123"), "IPV6 1111::4444:5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("::4444:5555:6666:123.123.123.123"), "IPV6 ::4444:5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("1111::3333:4444:5555:6666:123.123.123.123"), "IPV6 1111::3333:4444:5555:6666:123.123.123.123 should be valid");
+        assertTrue(validator.isValidInet6Address("::2222:3333:4444:5555:6666:123.123.123.123"), "IPV6 ::2222:3333:4444:5555:6666:123.123.123.123 should be valid");
         // Trying combinations of "0" and "::"
         // These are all syntactically correct, but are bad form
         // because "0" adjacent to "::" should be combined into "::"
-        assertTrue("IPV6 ::0:0:0:0:0:0:0 should be valid", validator.isValidInet6Address("::0:0:0:0:0:0:0"));
-        assertTrue("IPV6 ::0:0:0:0:0:0 should be valid", validator.isValidInet6Address("::0:0:0:0:0:0"));
-        assertTrue("IPV6 ::0:0:0:0:0 should be valid", validator.isValidInet6Address("::0:0:0:0:0"));
-        assertTrue("IPV6 ::0:0:0:0 should be valid", validator.isValidInet6Address("::0:0:0:0"));
-        assertTrue("IPV6 ::0:0:0 should be valid", validator.isValidInet6Address("::0:0:0"));
-        assertTrue("IPV6 ::0:0 should be valid", validator.isValidInet6Address("::0:0"));
-        assertTrue("IPV6 ::0 should be valid", validator.isValidInet6Address("::0"));
-        assertTrue("IPV6 0:0:0:0:0:0:0:: should be valid", validator.isValidInet6Address("0:0:0:0:0:0:0::"));
-        assertTrue("IPV6 0:0:0:0:0:0:: should be valid", validator.isValidInet6Address("0:0:0:0:0:0::"));
-        assertTrue("IPV6 0:0:0:0:0:: should be valid", validator.isValidInet6Address("0:0:0:0:0::"));
-        assertTrue("IPV6 0:0:0:0:: should be valid", validator.isValidInet6Address("0:0:0:0::"));
-        assertTrue("IPV6 0:0:0:: should be valid", validator.isValidInet6Address("0:0:0::"));
-        assertTrue("IPV6 0:0:: should be valid", validator.isValidInet6Address("0:0::"));
-        assertTrue("IPV6 0:: should be valid", validator.isValidInet6Address("0::"));
+        assertTrue(validator.isValidInet6Address("::0:0:0:0:0:0:0"), "IPV6 ::0:0:0:0:0:0:0 should be valid");
+        assertTrue(validator.isValidInet6Address("::0:0:0:0:0:0"), "IPV6 ::0:0:0:0:0:0 should be valid");
+        assertTrue(validator.isValidInet6Address("::0:0:0:0:0"), "IPV6 ::0:0:0:0:0 should be valid");
+        assertTrue(validator.isValidInet6Address("::0:0:0:0"), "IPV6 ::0:0:0:0 should be valid");
+        assertTrue(validator.isValidInet6Address("::0:0:0"), "IPV6 ::0:0:0 should be valid");
+        assertTrue(validator.isValidInet6Address("::0:0"), "IPV6 ::0:0 should be valid");
+        assertTrue(validator.isValidInet6Address("::0"), "IPV6 ::0 should be valid");
+        assertTrue(validator.isValidInet6Address("0:0:0:0:0:0:0::"), "IPV6 0:0:0:0:0:0:0:: should be valid");
+        assertTrue(validator.isValidInet6Address("0:0:0:0:0:0::"), "IPV6 0:0:0:0:0:0:: should be valid");
+        assertTrue(validator.isValidInet6Address("0:0:0:0:0::"), "IPV6 0:0:0:0:0:: should be valid");
+        assertTrue(validator.isValidInet6Address("0:0:0:0::"), "IPV6 0:0:0:0:: should be valid");
+        assertTrue(validator.isValidInet6Address("0:0:0::"), "IPV6 0:0:0:: should be valid");
+        assertTrue(validator.isValidInet6Address("0:0::"), "IPV6 0:0:: should be valid");
+        assertTrue(validator.isValidInet6Address("0::"), "IPV6 0:: should be valid");
         // Invalid data
-        assertFalse("IPV6 XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX should be invalid", validator.isValidInet6Address("XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX"));
+        assertFalse(validator.isValidInet6Address("XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX"), "IPV6 XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX should be invalid");
         // Too many components
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777:8888:9999 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888:9999"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777:8888:: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888::"));
-        assertFalse("IPV6 ::2222:3333:4444:5555:6666:7777:8888:9999 should be invalid", validator.isValidInet6Address("::2222:3333:4444:5555:6666:7777:8888:9999"));
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888:9999"), "IPV6 1111:2222:3333:4444:5555:6666:7777:8888:9999 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888::"), "IPV6 1111:2222:3333:4444:5555:6666:7777:8888:: should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444:5555:6666:7777:8888:9999"), "IPV6 ::2222:3333:4444:5555:6666:7777:8888:9999 should be invalid");
         // Too few components
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555"));
-        assertFalse("IPV6 1111:2222:3333:4444 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444"));
-        assertFalse("IPV6 1111:2222:3333 should be invalid", validator.isValidInet6Address("1111:2222:3333"));
-        assertFalse("IPV6 1111:2222 should be invalid", validator.isValidInet6Address("1111:2222"));
-        assertFalse("IPV6 1111 should be invalid", validator.isValidInet6Address("1111"));
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777"), "IPV6 1111:2222:3333:4444:5555:6666:7777 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666"), "IPV6 1111:2222:3333:4444:5555:6666 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555"), "IPV6 1111:2222:3333:4444:5555 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444"), "IPV6 1111:2222:3333:4444 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333"), "IPV6 1111:2222:3333 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222"), "IPV6 1111:2222 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111"), "IPV6 1111 should be invalid");
         // Missing :
-        assertFalse("IPV6 11112222:3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("11112222:3333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 1111:22223333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("1111:22223333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 1111:2222:33334444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("1111:2222:33334444:5555:6666:7777:8888"));
-        assertFalse("IPV6 1111:2222:3333:44445555:6666:7777:8888 should be invalid", validator.isValidInet6Address("1111:2222:3333:44445555:6666:7777:8888"));
-        assertFalse("IPV6 1111:2222:3333:4444:55556666:7777:8888 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:55556666:7777:8888"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:66667777:8888 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:66667777:8888"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:77778888 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:77778888"));
+        assertFalse(validator.isValidInet6Address("11112222:3333:4444:5555:6666:7777:8888"), "IPV6 11112222:3333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:22223333:4444:5555:6666:7777:8888"), "IPV6 1111:22223333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:33334444:5555:6666:7777:8888"), "IPV6 1111:2222:33334444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:44445555:6666:7777:8888"), "IPV6 1111:2222:3333:44445555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:55556666:7777:8888"), "IPV6 1111:2222:3333:4444:55556666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:66667777:8888"), "IPV6 1111:2222:3333:4444:5555:66667777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:77778888"), "IPV6 1111:2222:3333:4444:5555:6666:77778888 should be invalid");
         // Missing : intended for ::
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888:"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:"));
-        assertFalse("IPV6 1111:2222:3333:4444: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:"));
-        assertFalse("IPV6 1111:2222:3333: should be invalid", validator.isValidInet6Address("1111:2222:3333:"));
-        assertFalse("IPV6 1111:2222: should be invalid", validator.isValidInet6Address("1111:2222:"));
-        assertFalse("IPV6 :8888 should be invalid", validator.isValidInet6Address(":8888"));
-        assertFalse("IPV6 :7777:8888 should be invalid", validator.isValidInet6Address(":7777:8888"));
-        assertFalse("IPV6 :6666:7777:8888 should be invalid", validator.isValidInet6Address(":6666:7777:8888"));
-        assertFalse("IPV6 :5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":5555:6666:7777:8888"));
-        assertFalse("IPV6 :4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":3333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :2222:3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":2222:3333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666:7777:8888"));
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888:"), "IPV6 1111:2222:3333:4444:5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:"), "IPV6 1111:2222:3333:4444:5555:6666:7777: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:"), "IPV6 1111:2222:3333:4444:5555:6666: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:"), "IPV6 1111:2222:3333:4444:5555: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:"), "IPV6 1111:2222:3333:4444: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:"), "IPV6 1111:2222:3333: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:"), "IPV6 1111:2222: should be invalid");
+        assertFalse(validator.isValidInet6Address(":8888"), "IPV6 :8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":7777:8888"), "IPV6 :7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":6666:7777:8888"), "IPV6 :6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":5555:6666:7777:8888"), "IPV6 :5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":4444:5555:6666:7777:8888"), "IPV6 :4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":3333:4444:5555:6666:7777:8888"), "IPV6 :3333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":2222:3333:4444:5555:6666:7777:8888"), "IPV6 :2222:3333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666:7777:8888"), "IPV6 :1111:2222:3333:4444:5555:6666:7777:8888 should be invalid");
         // :::
-        assertFalse("IPV6 :::2222:3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":::2222:3333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 1111:::3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("1111:::3333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 1111:2222:::4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("1111:2222:::4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 1111:2222:3333:::5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("1111:2222:3333:::5555:6666:7777:8888"));
-        assertFalse("IPV6 1111:2222:3333:4444:::6666:7777:8888 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:::6666:7777:8888"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:::7777:8888 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:::7777:8888"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:::8888 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:::8888"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777::: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:::"));
+        assertFalse(validator.isValidInet6Address(":::2222:3333:4444:5555:6666:7777:8888"), "IPV6 :::2222:3333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:::3333:4444:5555:6666:7777:8888"), "IPV6 1111:::3333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:::4444:5555:6666:7777:8888"), "IPV6 1111:2222:::4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:::5555:6666:7777:8888"), "IPV6 1111:2222:3333:::5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:::6666:7777:8888"), "IPV6 1111:2222:3333:4444:::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:::7777:8888"), "IPV6 1111:2222:3333:4444:5555:::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:::8888"), "IPV6 1111:2222:3333:4444:5555:6666:::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:::"), "IPV6 1111:2222:3333:4444:5555:6666:7777::: should be invalid");
         // Double ::
-        assertFalse("IPV6 ::2222::4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("::2222::4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 ::2222:3333::5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("::2222:3333::5555:6666:7777:8888"));
-        assertFalse("IPV6 ::2222:3333:4444::6666:7777:8888 should be invalid", validator.isValidInet6Address("::2222:3333:4444::6666:7777:8888"));
-        assertFalse("IPV6 ::2222:3333:4444:5555::7777:8888 should be invalid", validator.isValidInet6Address("::2222:3333:4444:5555::7777:8888"));
-        assertFalse("IPV6 ::2222:3333:4444:5555:7777::8888 should be invalid", validator.isValidInet6Address("::2222:3333:4444:5555:7777::8888"));
-        assertFalse("IPV6 ::2222:3333:4444:5555:7777:8888:: should be invalid", validator.isValidInet6Address("::2222:3333:4444:5555:7777:8888::"));
-        assertFalse("IPV6 1111::3333::5555:6666:7777:8888 should be invalid", validator.isValidInet6Address("1111::3333::5555:6666:7777:8888"));
-        assertFalse("IPV6 1111::3333:4444::6666:7777:8888 should be invalid", validator.isValidInet6Address("1111::3333:4444::6666:7777:8888"));
-        assertFalse("IPV6 1111::3333:4444:5555::7777:8888 should be invalid", validator.isValidInet6Address("1111::3333:4444:5555::7777:8888"));
-        assertFalse("IPV6 1111::3333:4444:5555:6666::8888 should be invalid", validator.isValidInet6Address("1111::3333:4444:5555:6666::8888"));
-        assertFalse("IPV6 1111::3333:4444:5555:6666:7777:: should be invalid", validator.isValidInet6Address("1111::3333:4444:5555:6666:7777::"));
-        assertFalse("IPV6 1111:2222::4444::6666:7777:8888 should be invalid", validator.isValidInet6Address("1111:2222::4444::6666:7777:8888"));
-        assertFalse("IPV6 1111:2222::4444:5555::7777:8888 should be invalid", validator.isValidInet6Address("1111:2222::4444:5555::7777:8888"));
-        assertFalse("IPV6 1111:2222::4444:5555:6666::8888 should be invalid", validator.isValidInet6Address("1111:2222::4444:5555:6666::8888"));
-        assertFalse("IPV6 1111:2222::4444:5555:6666:7777:: should be invalid", validator.isValidInet6Address("1111:2222::4444:5555:6666:7777::"));
-        assertFalse("IPV6 1111:2222:3333::5555::7777:8888 should be invalid", validator.isValidInet6Address("1111:2222:3333::5555::7777:8888"));
-        assertFalse("IPV6 1111:2222:3333::5555:6666::8888 should be invalid", validator.isValidInet6Address("1111:2222:3333::5555:6666::8888"));
-        assertFalse("IPV6 1111:2222:3333::5555:6666:7777:: should be invalid", validator.isValidInet6Address("1111:2222:3333::5555:6666:7777::"));
-        assertFalse("IPV6 1111:2222:3333:4444::6666::8888 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444::6666::8888"));
-        assertFalse("IPV6 1111:2222:3333:4444::6666:7777:: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444::6666:7777::"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555::7777:: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555::7777::"));
+        assertFalse(validator.isValidInet6Address("::2222::4444:5555:6666:7777:8888"), "IPV6 ::2222::4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333::5555:6666:7777:8888"), "IPV6 ::2222:3333::5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444::6666:7777:8888"), "IPV6 ::2222:3333:4444::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444:5555::7777:8888"), "IPV6 ::2222:3333:4444:5555::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444:5555:7777::8888"), "IPV6 ::2222:3333:4444:5555:7777::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444:5555:7777:8888::"), "IPV6 ::2222:3333:4444:5555:7777:8888:: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333::5555:6666:7777:8888"), "IPV6 1111::3333::5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333:4444::6666:7777:8888"), "IPV6 1111::3333:4444::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333:4444:5555::7777:8888"), "IPV6 1111::3333:4444:5555::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333:4444:5555:6666::8888"), "IPV6 1111::3333:4444:5555:6666::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333:4444:5555:6666:7777::"), "IPV6 1111::3333:4444:5555:6666:7777:: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::4444::6666:7777:8888"), "IPV6 1111:2222::4444::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::4444:5555::7777:8888"), "IPV6 1111:2222::4444:5555::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::4444:5555:6666::8888"), "IPV6 1111:2222::4444:5555:6666::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::4444:5555:6666:7777::"), "IPV6 1111:2222::4444:5555:6666:7777:: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::5555::7777:8888"), "IPV6 1111:2222:3333::5555::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::5555:6666::8888"), "IPV6 1111:2222:3333::5555:6666::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::5555:6666:7777::"), "IPV6 1111:2222:3333::5555:6666:7777:: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444::6666::8888"), "IPV6 1111:2222:3333:4444::6666::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444::6666:7777::"), "IPV6 1111:2222:3333:4444::6666:7777:: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555::7777::"), "IPV6 1111:2222:3333:4444:5555::7777:: should be invalid");
         // Too many components"
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777:8888:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666::1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666::1.2.3.4"));
-        assertFalse("IPV6 ::2222:3333:4444:5555:6666:7777:1.2.3.4 should be invalid", validator.isValidInet6Address("::2222:3333:4444:5555:6666:7777:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:1.2.3.4.5 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:1.2.3.4.5"));
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:8888:1.2.3.4"), "IPV6 1111:2222:3333:4444:5555:6666:7777:8888:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:1.2.3.4"), "IPV6 1111:2222:3333:4444:5555:6666:7777:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666::1.2.3.4"), "IPV6 1111:2222:3333:4444:5555:6666::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444:5555:6666:7777:1.2.3.4"), "IPV6 ::2222:3333:4444:5555:6666:7777:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:1.2.3.4.5"), "IPV6 1111:2222:3333:4444:5555:6666:1.2.3.4.5 should be invalid");
         // Too few components
-        assertFalse("IPV6 1111:2222:3333:4444:5555:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:1.2.3.4"));
-        assertFalse("IPV6 1111:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:1.2.3.4"));
-        assertFalse("IPV6 1.2.3.4 should be invalid", validator.isValidInet6Address("1.2.3.4"));
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:1.2.3.4"), "IPV6 1111:2222:3333:4444:5555:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:1.2.3.4"), "IPV6 1111:2222:3333:4444:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:1.2.3.4"), "IPV6 1111:2222:3333:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:1.2.3.4"), "IPV6 1111:2222:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:1.2.3.4"), "IPV6 1111:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1.2.3.4"), "IPV6 1.2.3.4 should be invalid");
         // Missing :
-        assertFalse("IPV6 11112222:3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("11112222:3333:4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111:22223333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:22223333:4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:33334444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:33334444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:44445555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:44445555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:55556666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:55556666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:66661.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:66661.2.3.4"));
+        assertFalse(validator.isValidInet6Address("11112222:3333:4444:5555:6666:1.2.3.4"), "IPV6 11112222:3333:4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:22223333:4444:5555:6666:1.2.3.4"), "IPV6 1111:22223333:4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:33334444:5555:6666:1.2.3.4"), "IPV6 1111:2222:33334444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:44445555:6666:1.2.3.4"), "IPV6 1111:2222:3333:44445555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:55556666:1.2.3.4"), "IPV6 1111:2222:3333:4444:55556666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:66661.2.3.4"), "IPV6 1111:2222:3333:4444:5555:66661.2.3.4 should be invalid");
         // Missing .
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:255255.255.255 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:255255.255.255"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:255.255255.255 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:255.255255.255"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:255.255.255255 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:255.255.255255"));
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:255255.255.255"), "IPV6 1111:2222:3333:4444:5555:6666:255255.255.255 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:255.255255.255"), "IPV6 1111:2222:3333:4444:5555:6666:255.255255.255 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:255.255.255255"), "IPV6 1111:2222:3333:4444:5555:6666:255.255.255255 should be invalid");
         // Missing : intended for ::
-        assertFalse("IPV6 :1.2.3.4 should be invalid", validator.isValidInet6Address(":1.2.3.4"));
-        assertFalse("IPV6 :6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":6666:1.2.3.4"));
-        assertFalse("IPV6 :5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":3333:4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :2222:3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":2222:3333:4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666:1.2.3.4"));
+        assertFalse(validator.isValidInet6Address(":1.2.3.4"), "IPV6 :1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":6666:1.2.3.4"), "IPV6 :6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":5555:6666:1.2.3.4"), "IPV6 :5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":4444:5555:6666:1.2.3.4"), "IPV6 :4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":3333:4444:5555:6666:1.2.3.4"), "IPV6 :3333:4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":2222:3333:4444:5555:6666:1.2.3.4"), "IPV6 :2222:3333:4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666:1.2.3.4"), "IPV6 :1111:2222:3333:4444:5555:6666:1.2.3.4 should be invalid");
         // :::
-        assertFalse("IPV6 :::2222:3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":::2222:3333:4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111:::3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:::3333:4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:::4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:::4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:::5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:::5555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:::6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:::6666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:::1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:::1.2.3.4"));
+        assertFalse(validator.isValidInet6Address(":::2222:3333:4444:5555:6666:1.2.3.4"), "IPV6 :::2222:3333:4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:::3333:4444:5555:6666:1.2.3.4"), "IPV6 1111:::3333:4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:::4444:5555:6666:1.2.3.4"), "IPV6 1111:2222:::4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:::5555:6666:1.2.3.4"), "IPV6 1111:2222:3333:::5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:::6666:1.2.3.4"), "IPV6 1111:2222:3333:4444:::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:::1.2.3.4"), "IPV6 1111:2222:3333:4444:5555:::1.2.3.4 should be invalid");
         // Double ::
-        assertFalse("IPV6 ::2222::4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("::2222::4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 ::2222:3333::5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("::2222:3333::5555:6666:1.2.3.4"));
-        assertFalse("IPV6 ::2222:3333:4444::6666:1.2.3.4 should be invalid", validator.isValidInet6Address("::2222:3333:4444::6666:1.2.3.4"));
-        assertFalse("IPV6 ::2222:3333:4444:5555::1.2.3.4 should be invalid", validator.isValidInet6Address("::2222:3333:4444:5555::1.2.3.4"));
-        assertFalse("IPV6 1111::3333::5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111::3333::5555:6666:1.2.3.4"));
-        assertFalse("IPV6 1111::3333:4444::6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111::3333:4444::6666:1.2.3.4"));
-        assertFalse("IPV6 1111::3333:4444:5555::1.2.3.4 should be invalid", validator.isValidInet6Address("1111::3333:4444:5555::1.2.3.4"));
-        assertFalse("IPV6 1111:2222::4444::6666:1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222::4444::6666:1.2.3.4"));
-        assertFalse("IPV6 1111:2222::4444:5555::1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222::4444:5555::1.2.3.4"));
-        assertFalse("IPV6 1111:2222:3333::5555::1.2.3.4 should be invalid", validator.isValidInet6Address("1111:2222:3333::5555::1.2.3.4"));
+        assertFalse(validator.isValidInet6Address("::2222::4444:5555:6666:1.2.3.4"), "IPV6 ::2222::4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333::5555:6666:1.2.3.4"), "IPV6 ::2222:3333::5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444::6666:1.2.3.4"), "IPV6 ::2222:3333:4444::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444:5555::1.2.3.4"), "IPV6 ::2222:3333:4444:5555::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333::5555:6666:1.2.3.4"), "IPV6 1111::3333::5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333:4444::6666:1.2.3.4"), "IPV6 1111::3333:4444::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333:4444:5555::1.2.3.4"), "IPV6 1111::3333:4444:5555::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::4444::6666:1.2.3.4"), "IPV6 1111:2222::4444::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::4444:5555::1.2.3.4"), "IPV6 1111:2222::4444:5555::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::5555::1.2.3.4"), "IPV6 1111:2222:3333::5555::1.2.3.4 should be invalid");
         // Missing parts
-        assertFalse("IPV6 ::. should be invalid", validator.isValidInet6Address("::."));
-        assertFalse("IPV6 ::.. should be invalid", validator.isValidInet6Address("::.."));
-        assertFalse("IPV6 ::... should be invalid", validator.isValidInet6Address("::..."));
-        assertFalse("IPV6 ::1... should be invalid", validator.isValidInet6Address("::1..."));
-        assertFalse("IPV6 ::1.2.. should be invalid", validator.isValidInet6Address("::1.2.."));
-        assertFalse("IPV6 ::1.2.3. should be invalid", validator.isValidInet6Address("::1.2.3."));
-        assertFalse("IPV6 ::.2.. should be invalid", validator.isValidInet6Address("::.2.."));
-        assertFalse("IPV6 ::.2.3. should be invalid", validator.isValidInet6Address("::.2.3."));
-        assertFalse("IPV6 ::.2.3.4 should be invalid", validator.isValidInet6Address("::.2.3.4"));
-        assertFalse("IPV6 ::..3. should be invalid", validator.isValidInet6Address("::..3."));
-        assertFalse("IPV6 ::..3.4 should be invalid", validator.isValidInet6Address("::..3.4"));
-        assertFalse("IPV6 ::...4 should be invalid", validator.isValidInet6Address("::...4"));
+        assertFalse(validator.isValidInet6Address("::."), "IPV6 ::. should be invalid");
+        assertFalse(validator.isValidInet6Address("::.."), "IPV6 ::.. should be invalid");
+        assertFalse(validator.isValidInet6Address("::..."), "IPV6 ::... should be invalid");
+        assertFalse(validator.isValidInet6Address("::1..."), "IPV6 ::1... should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.2.."), "IPV6 ::1.2.. should be invalid");
+        assertFalse(validator.isValidInet6Address("::1.2.3."), "IPV6 ::1.2.3. should be invalid");
+        assertFalse(validator.isValidInet6Address("::.2.."), "IPV6 ::.2.. should be invalid");
+        assertFalse(validator.isValidInet6Address("::.2.3."), "IPV6 ::.2.3. should be invalid");
+        assertFalse(validator.isValidInet6Address("::.2.3.4"), "IPV6 ::.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::..3."), "IPV6 ::..3. should be invalid");
+        assertFalse(validator.isValidInet6Address("::..3.4"), "IPV6 ::..3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address("::...4"), "IPV6 ::...4 should be invalid");
         // Extra : in front
-        assertFalse("IPV6 :1111:2222:3333:4444:5555:6666:7777:: should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666:7777::"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555:6666:: should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666::"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555:: should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555::"));
-        assertFalse("IPV6 :1111:2222:3333:4444:: should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444::"));
-        assertFalse("IPV6 :1111:2222:3333:: should be invalid", validator.isValidInet6Address(":1111:2222:3333::"));
-        assertFalse("IPV6 :1111:2222:: should be invalid", validator.isValidInet6Address(":1111:2222::"));
-        assertFalse("IPV6 :1111:: should be invalid", validator.isValidInet6Address(":1111::"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555:6666::8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666::8888"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555::8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555::8888"));
-        assertFalse("IPV6 :1111:2222:3333:4444::8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444::8888"));
-        assertFalse("IPV6 :1111:2222:3333::8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333::8888"));
-        assertFalse("IPV6 :1111:2222::8888 should be invalid", validator.isValidInet6Address(":1111:2222::8888"));
-        assertFalse("IPV6 :1111::8888 should be invalid", validator.isValidInet6Address(":1111::8888"));
-        assertFalse("IPV6 :::8888 should be invalid", validator.isValidInet6Address(":::8888"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555::7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555::7777:8888"));
-        assertFalse("IPV6 :1111:2222:3333:4444::7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444::7777:8888"));
-        assertFalse("IPV6 :1111:2222:3333::7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333::7777:8888"));
-        assertFalse("IPV6 :1111:2222::7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222::7777:8888"));
-        assertFalse("IPV6 :1111::7777:8888 should be invalid", validator.isValidInet6Address(":1111::7777:8888"));
-        assertFalse("IPV6 :::7777:8888 should be invalid", validator.isValidInet6Address(":::7777:8888"));
-        assertFalse("IPV6 :1111:2222:3333:4444::6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444::6666:7777:8888"));
-        assertFalse("IPV6 :1111:2222:3333::6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333::6666:7777:8888"));
-        assertFalse("IPV6 :1111:2222::6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222::6666:7777:8888"));
-        assertFalse("IPV6 :1111::6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111::6666:7777:8888"));
-        assertFalse("IPV6 :::6666:7777:8888 should be invalid", validator.isValidInet6Address(":::6666:7777:8888"));
-        assertFalse("IPV6 :1111:2222:3333::5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222:3333::5555:6666:7777:8888"));
-        assertFalse("IPV6 :1111:2222::5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222::5555:6666:7777:8888"));
-        assertFalse("IPV6 :1111::5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111::5555:6666:7777:8888"));
-        assertFalse("IPV6 :::5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":::5555:6666:7777:8888"));
-        assertFalse("IPV6 :1111:2222::4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111:2222::4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :1111::4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111::4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :::4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":::4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :1111::3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":1111::3333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :::3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":::3333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :::2222:3333:4444:5555:6666:7777:8888 should be invalid", validator.isValidInet6Address(":::2222:3333:4444:5555:6666:7777:8888"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :1111:2222:3333:4444:5555::1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444:5555::1.2.3.4"));
-        assertFalse("IPV6 :1111:2222:3333:4444::1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444::1.2.3.4"));
-        assertFalse("IPV6 :1111:2222:3333::1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222:3333::1.2.3.4"));
-        assertFalse("IPV6 :1111:2222::1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222::1.2.3.4"));
-        assertFalse("IPV6 :1111::1.2.3.4 should be invalid", validator.isValidInet6Address(":1111::1.2.3.4"));
-        assertFalse("IPV6 :::1.2.3.4 should be invalid", validator.isValidInet6Address(":::1.2.3.4"));
-        assertFalse("IPV6 :1111:2222:3333:4444::6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222:3333:4444::6666:1.2.3.4"));
-        assertFalse("IPV6 :1111:2222:3333::6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222:3333::6666:1.2.3.4"));
-        assertFalse("IPV6 :1111:2222::6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222::6666:1.2.3.4"));
-        assertFalse("IPV6 :1111::6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111::6666:1.2.3.4"));
-        assertFalse("IPV6 :::6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":::6666:1.2.3.4"));
-        assertFalse("IPV6 :1111:2222:3333::5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222:3333::5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :1111:2222::5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222::5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :1111::5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111::5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :::5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":::5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :1111:2222::4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111:2222::4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :1111::4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111::4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :::4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":::4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :1111::3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":1111::3333:4444:5555:6666:1.2.3.4"));
-        assertFalse("IPV6 :::2222:3333:4444:5555:6666:1.2.3.4 should be invalid", validator.isValidInet6Address(":::2222:3333:4444:5555:6666:1.2.3.4"));
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666:7777::"), "IPV6 :1111:2222:3333:4444:5555:6666:7777:: should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666::"), "IPV6 :1111:2222:3333:4444:5555:6666:: should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555::"), "IPV6 :1111:2222:3333:4444:5555:: should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444::"), "IPV6 :1111:2222:3333:4444:: should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::"), "IPV6 :1111:2222:3333:: should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::"), "IPV6 :1111:2222:: should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::"), "IPV6 :1111:: should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666::8888"), "IPV6 :1111:2222:3333:4444:5555:6666::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555::8888"), "IPV6 :1111:2222:3333:4444:5555::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444::8888"), "IPV6 :1111:2222:3333:4444::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::8888"), "IPV6 :1111:2222:3333::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::8888"), "IPV6 :1111:2222::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::8888"), "IPV6 :1111::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::8888"), "IPV6 :::8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555::7777:8888"), "IPV6 :1111:2222:3333:4444:5555::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444::7777:8888"), "IPV6 :1111:2222:3333:4444::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::7777:8888"), "IPV6 :1111:2222:3333::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::7777:8888"), "IPV6 :1111:2222::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::7777:8888"), "IPV6 :1111::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::7777:8888"), "IPV6 :::7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444::6666:7777:8888"), "IPV6 :1111:2222:3333:4444::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::6666:7777:8888"), "IPV6 :1111:2222:3333::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::6666:7777:8888"), "IPV6 :1111:2222::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::6666:7777:8888"), "IPV6 :1111::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::6666:7777:8888"), "IPV6 :::6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::5555:6666:7777:8888"), "IPV6 :1111:2222:3333::5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::5555:6666:7777:8888"), "IPV6 :1111:2222::5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::5555:6666:7777:8888"), "IPV6 :1111::5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::5555:6666:7777:8888"), "IPV6 :::5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::4444:5555:6666:7777:8888"), "IPV6 :1111:2222::4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::4444:5555:6666:7777:8888"), "IPV6 :1111::4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::4444:5555:6666:7777:8888"), "IPV6 :::4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::3333:4444:5555:6666:7777:8888"), "IPV6 :1111::3333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::3333:4444:5555:6666:7777:8888"), "IPV6 :::3333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::2222:3333:4444:5555:6666:7777:8888"), "IPV6 :::2222:3333:4444:5555:6666:7777:8888 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555:6666:1.2.3.4"), "IPV6 :1111:2222:3333:4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444:5555::1.2.3.4"), "IPV6 :1111:2222:3333:4444:5555::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444::1.2.3.4"), "IPV6 :1111:2222:3333:4444::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::1.2.3.4"), "IPV6 :1111:2222:3333::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::1.2.3.4"), "IPV6 :1111:2222::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::1.2.3.4"), "IPV6 :1111::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::1.2.3.4"), "IPV6 :::1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333:4444::6666:1.2.3.4"), "IPV6 :1111:2222:3333:4444::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::6666:1.2.3.4"), "IPV6 :1111:2222:3333::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::6666:1.2.3.4"), "IPV6 :1111:2222::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::6666:1.2.3.4"), "IPV6 :1111::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::6666:1.2.3.4"), "IPV6 :::6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222:3333::5555:6666:1.2.3.4"), "IPV6 :1111:2222:3333::5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::5555:6666:1.2.3.4"), "IPV6 :1111:2222::5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::5555:6666:1.2.3.4"), "IPV6 :1111::5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::5555:6666:1.2.3.4"), "IPV6 :::5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111:2222::4444:5555:6666:1.2.3.4"), "IPV6 :1111:2222::4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::4444:5555:6666:1.2.3.4"), "IPV6 :1111::4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::4444:5555:6666:1.2.3.4"), "IPV6 :::4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":1111::3333:4444:5555:6666:1.2.3.4"), "IPV6 :1111::3333:4444:5555:6666:1.2.3.4 should be invalid");
+        assertFalse(validator.isValidInet6Address(":::2222:3333:4444:5555:6666:1.2.3.4"), "IPV6 :::2222:3333:4444:5555:6666:1.2.3.4 should be invalid");
         // Extra : at end
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666:7777::: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:::"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666::: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:::"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555::: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:::"));
-        assertFalse("IPV6 1111:2222:3333:4444::: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:::"));
-        assertFalse("IPV6 1111:2222:3333::: should be invalid", validator.isValidInet6Address("1111:2222:3333:::"));
-        assertFalse("IPV6 1111:2222::: should be invalid", validator.isValidInet6Address("1111:2222:::"));
-        assertFalse("IPV6 1111::: should be invalid", validator.isValidInet6Address("1111:::"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555:6666::8888: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555:6666::8888:"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555::8888: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555::8888:"));
-        assertFalse("IPV6 1111:2222:3333:4444::8888: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444::8888:"));
-        assertFalse("IPV6 1111:2222:3333::8888: should be invalid", validator.isValidInet6Address("1111:2222:3333::8888:"));
-        assertFalse("IPV6 1111:2222::8888: should be invalid", validator.isValidInet6Address("1111:2222::8888:"));
-        assertFalse("IPV6 1111::8888: should be invalid", validator.isValidInet6Address("1111::8888:"));
-        assertFalse("IPV6 ::8888: should be invalid", validator.isValidInet6Address("::8888:"));
-        assertFalse("IPV6 1111:2222:3333:4444:5555::7777:8888: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444:5555::7777:8888:"));
-        assertFalse("IPV6 1111:2222:3333:4444::7777:8888: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444::7777:8888:"));
-        assertFalse("IPV6 1111:2222:3333::7777:8888: should be invalid", validator.isValidInet6Address("1111:2222:3333::7777:8888:"));
-        assertFalse("IPV6 1111:2222::7777:8888: should be invalid", validator.isValidInet6Address("1111:2222::7777:8888:"));
-        assertFalse("IPV6 1111::7777:8888: should be invalid", validator.isValidInet6Address("1111::7777:8888:"));
-        assertFalse("IPV6 ::7777:8888: should be invalid", validator.isValidInet6Address("::7777:8888:"));
-        assertFalse("IPV6 1111:2222:3333:4444::6666:7777:8888: should be invalid", validator.isValidInet6Address("1111:2222:3333:4444::6666:7777:8888:"));
-        assertFalse("IPV6 1111:2222:3333::6666:7777:8888: should be invalid", validator.isValidInet6Address("1111:2222:3333::6666:7777:8888:"));
-        assertFalse("IPV6 1111:2222::6666:7777:8888: should be invalid", validator.isValidInet6Address("1111:2222::6666:7777:8888:"));
-        assertFalse("IPV6 1111::6666:7777:8888: should be invalid", validator.isValidInet6Address("1111::6666:7777:8888:"));
-        assertFalse("IPV6 ::6666:7777:8888: should be invalid", validator.isValidInet6Address("::6666:7777:8888:"));
-        assertFalse("IPV6 1111:2222:3333::5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("1111:2222:3333::5555:6666:7777:8888:"));
-        assertFalse("IPV6 1111:2222::5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("1111:2222::5555:6666:7777:8888:"));
-        assertFalse("IPV6 1111::5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("1111::5555:6666:7777:8888:"));
-        assertFalse("IPV6 ::5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("::5555:6666:7777:8888:"));
-        assertFalse("IPV6 1111:2222::4444:5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("1111:2222::4444:5555:6666:7777:8888:"));
-        assertFalse("IPV6 1111::4444:5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("1111::4444:5555:6666:7777:8888:"));
-        assertFalse("IPV6 ::4444:5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("::4444:5555:6666:7777:8888:"));
-        assertFalse("IPV6 1111::3333:4444:5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("1111::3333:4444:5555:6666:7777:8888:"));
-        assertFalse("IPV6 ::3333:4444:5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("::3333:4444:5555:6666:7777:8888:"));
-        assertFalse("IPV6 ::2222:3333:4444:5555:6666:7777:8888: should be invalid", validator.isValidInet6Address("::2222:3333:4444:5555:6666:7777:8888:"));
-        assertTrue("IPV6 0:a:b:c:d:e:f:: should be valid", validator.isValidInet6Address("0:a:b:c:d:e:f::"));
-        assertTrue("IPV6 ::0:a:b:c:d:e:f should be valid", validator.isValidInet6Address("::0:a:b:c:d:e:f")); // syntactically correct, but bad form (::0:... could be combined)
-        assertTrue("IPV6 a:b:c:d:e:f:0:: should be valid", validator.isValidInet6Address("a:b:c:d:e:f:0::"));
-        assertFalse("IPV6 ':10.0.0.1 should be invalid", validator.isValidInet6Address("':10.0.0.1"));
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:7777:::"), "IPV6 1111:2222:3333:4444:5555:6666:7777::: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666:::"), "IPV6 1111:2222:3333:4444:5555:6666::: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:::"), "IPV6 1111:2222:3333:4444:5555::: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:::"), "IPV6 1111:2222:3333:4444::: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:::"), "IPV6 1111:2222:3333::: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:::"), "IPV6 1111:2222::: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:::"), "IPV6 1111::: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555:6666::8888:"), "IPV6 1111:2222:3333:4444:5555:6666::8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555::8888:"), "IPV6 1111:2222:3333:4444:5555::8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444::8888:"), "IPV6 1111:2222:3333:4444::8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::8888:"), "IPV6 1111:2222:3333::8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::8888:"), "IPV6 1111:2222::8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::8888:"), "IPV6 1111::8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("::8888:"), "IPV6 ::8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444:5555::7777:8888:"), "IPV6 1111:2222:3333:4444:5555::7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444::7777:8888:"), "IPV6 1111:2222:3333:4444::7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::7777:8888:"), "IPV6 1111:2222:3333::7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::7777:8888:"), "IPV6 1111:2222::7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::7777:8888:"), "IPV6 1111::7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("::7777:8888:"), "IPV6 ::7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333:4444::6666:7777:8888:"), "IPV6 1111:2222:3333:4444::6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::6666:7777:8888:"), "IPV6 1111:2222:3333::6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::6666:7777:8888:"), "IPV6 1111:2222::6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::6666:7777:8888:"), "IPV6 1111::6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("::6666:7777:8888:"), "IPV6 ::6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222:3333::5555:6666:7777:8888:"), "IPV6 1111:2222:3333::5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::5555:6666:7777:8888:"), "IPV6 1111:2222::5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::5555:6666:7777:8888:"), "IPV6 1111::5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("::5555:6666:7777:8888:"), "IPV6 ::5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111:2222::4444:5555:6666:7777:8888:"), "IPV6 1111:2222::4444:5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::4444:5555:6666:7777:8888:"), "IPV6 1111::4444:5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("::4444:5555:6666:7777:8888:"), "IPV6 ::4444:5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("1111::3333:4444:5555:6666:7777:8888:"), "IPV6 1111::3333:4444:5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("::3333:4444:5555:6666:7777:8888:"), "IPV6 ::3333:4444:5555:6666:7777:8888: should be invalid");
+        assertFalse(validator.isValidInet6Address("::2222:3333:4444:5555:6666:7777:8888:"), "IPV6 ::2222:3333:4444:5555:6666:7777:8888: should be invalid");
+        assertTrue(validator.isValidInet6Address("0:a:b:c:d:e:f::"), "IPV6 0:a:b:c:d:e:f:: should be valid");
+        assertTrue(validator.isValidInet6Address("::0:a:b:c:d:e:f"), "IPV6 ::0:a:b:c:d:e:f should be valid"); // syntactically correct, but bad form (::0:... could be combined)
+        assertTrue(validator.isValidInet6Address("a:b:c:d:e:f:0::"), "IPV6 a:b:c:d:e:f:0:: should be valid");
+        assertFalse(validator.isValidInet6Address("':10.0.0.1"), "IPV6 ':10.0.0.1 should be invalid");
     }
     // CHECKSTYLE.ON: ExecutableStatementCount
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/RegexValidatorTest.java	(revision 18690)
@@ -17,11 +17,11 @@
 package org.openstreetmap.josm.data.validation.routines;
 
-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.fail;
-
-import java.util.Arrays;
+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.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.regex.PatternSyntaxException;
 
@@ -60,22 +60,25 @@
 
         // isValid()
-        assertTrue("Sensitive isValid() valid",      sensitive.isValid("ac-DE-1"));
-        assertFalse("Sensitive isValid() invalid",   sensitive.isValid("AB-de-1"));
-        assertTrue("Insensitive isValid() valid",    insensitive.isValid("AB-de-1"));
-        assertFalse("Insensitive isValid() invalid", insensitive.isValid("ABd-de-1"));
+        assertTrue(sensitive.isValid("ac-DE-1"), "Sensitive isValid() valid");
+        assertFalse(sensitive.isValid("AB-de-1"), "Sensitive isValid() invalid");
+        assertTrue(insensitive.isValid("AB-de-1"), "Insensitive isValid() valid");
+        assertFalse(insensitive.isValid("ABd-de-1"), "Insensitive isValid() invalid");
 
         // validate()
-        assertEquals("Sensitive validate() valid",   "acDE1", sensitive.validate("ac-DE-1"));
-        assertNull("Sensitive validate() invalid",   sensitive.validate("AB-de-1"));
-        assertEquals("Insensitive validate() valid", "ABde1", insensitive.validate("AB-de-1"));
-        assertNull("Insensitive validate() invalid", insensitive.validate("ABd-de-1"));
+        assertEquals("acDE1", sensitive.validate("ac-DE-1"), "Sensitive validate() valid");
+        assertNull(sensitive.validate("AB-de-1"), "Sensitive validate() invalid");
+        assertEquals("ABde1", insensitive.validate("AB-de-1"), "Insensitive validate() valid");
+        assertNull(insensitive.validate("ABd-de-1"), "Insensitive validate() invalid");
 
         // match()
-        checkArray("Sensitive match() valid",     new String[] {"ac", "DE", "1"}, sensitive.match("ac-DE-1"));
-        checkArray("Sensitive match() invalid",   null,                           sensitive.match("AB-de-1"));
-        checkArray("Insensitive match() valid",   new String[] {"AB", "de", "1"}, insensitive.match("AB-de-1"));
-        checkArray("Insensitive match() invalid", null,                           insensitive.match("ABd-de-1"));
-        assertEquals("validate one", "ABC", (new RegexValidator("^([A-Z]*)$")).validate("ABC"));
-        checkArray("match one", new String[] {"ABC"}, (new RegexValidator("^([A-Z]*)$")).match("ABC"));
+        String[] result2 = sensitive.match("ac-DE-1");
+        assertArrayEquals(new String[] {"ac", "DE", "1"}, result2, "Sensitive match() valid");
+        assertNull(sensitive.match("AB-de-1"), "Sensitive match() invalid");
+        String[] result1 = insensitive.match("AB-de-1");
+        assertArrayEquals(new String[] {"AB", "de", "1"}, result1, "Insensitive match() valid");
+        assertNull(insensitive.match("ABd-de-1"), "Insensitive match() invalid");
+        assertEquals("ABC", (new RegexValidator("^([A-Z]*)$")).validate("ABC"), "validate one");
+        String[] result = (new RegexValidator("^([A-Z]*)$")).match("ABC");
+        assertArrayEquals(new String[] {"ABC"}, result, "match one");
     }
 
@@ -98,26 +101,26 @@
 
         // isValid()
-        assertTrue("Sensitive isValid() Multiple", multiple.isValid(value));
-        assertFalse("Sensitive isValid() 1st",     single1.isValid(value));
-        assertTrue("Sensitive isValid() 2nd",      single2.isValid(value));
-        assertFalse("Sensitive isValid() 3rd",     single3.isValid(value));
+        assertTrue(multiple.isValid(value), "Sensitive isValid() Multiple");
+        assertFalse(single1.isValid(value), "Sensitive isValid() 1st");
+        assertTrue(single2.isValid(value), "Sensitive isValid() 2nd");
+        assertFalse(single3.isValid(value), "Sensitive isValid() 3rd");
 
         // validate()
-        assertEquals("Sensitive validate() Multiple", expect, multiple.validate(value));
-        assertNull("Sensitive validate() 1st",        single1.validate(value));
-        assertEquals("Sensitive validate() 2nd",      expect, single2.validate(value));
-        assertNull("Sensitive validate() 3rd",        single3.validate(value));
+        assertEquals(expect, multiple.validate(value), "Sensitive validate() Multiple");
+        assertNull(single1.validate(value), "Sensitive validate() 1st");
+        assertEquals(expect, single2.validate(value), "Sensitive validate() 2nd");
+        assertNull(single3.validate(value), "Sensitive validate() 3rd");
 
         // match()
-        checkArray("Sensitive match() Multiple", array, multiple.match(value));
-        checkArray("Sensitive match() 1st",      null,  single1.match(value));
-        checkArray("Sensitive match() 2nd",      array, single2.match(value));
-        checkArray("Sensitive match() 3rd",      null,  single3.match(value));
+        assertArrayEquals(array, multiple.match(value), "Sensitive match() Multiple");
+        assertNull(single1.match(value), "Sensitive match() 1st");
+        assertArrayEquals(array, single2.match(value), "Sensitive match() 2nd");
+        assertNull(single3.match(value), "Sensitive match() 3rd");
 
         // All invalid
         value = "AAC*FDE*321";
-        assertFalse("isValid() Invalid", multiple.isValid(value));
-        assertNull("validate() Invalid", multiple.validate(value));
-        assertNull("match() Multiple",   multiple.match(value));
+        assertFalse(multiple.isValid(value), "isValid() Invalid");
+        assertNull(multiple.validate(value), "validate() Invalid");
+        assertNull(multiple.match(value), "match() Multiple");
     }
 
@@ -140,26 +143,26 @@
 
         // isValid()
-        assertTrue("isValid() Multiple", multiple.isValid(value));
-        assertFalse("isValid() 1st",     single1.isValid(value));
-        assertTrue("isValid() 2nd",      single2.isValid(value));
-        assertFalse("isValid() 3rd",     single3.isValid(value));
+        assertTrue(multiple.isValid(value), "isValid() Multiple");
+        assertFalse(single1.isValid(value), "isValid() 1st");
+        assertTrue(single2.isValid(value), "isValid() 2nd");
+        assertFalse(single3.isValid(value), "isValid() 3rd");
 
         // validate()
-        assertEquals("validate() Multiple", expect, multiple.validate(value));
-        assertNull("validate() 1st",        single1.validate(value));
-        assertEquals("validate() 2nd",      expect, single2.validate(value));
-        assertNull("validate() 3rd",        single3.validate(value));
+        assertEquals(expect, multiple.validate(value), "validate() Multiple");
+        assertNull(single1.validate(value), "validate() 1st");
+        assertEquals(expect, single2.validate(value), "validate() 2nd");
+        assertNull(single3.validate(value), "validate() 3rd");
 
         // match()
-        checkArray("match() Multiple", array, multiple.match(value));
-        checkArray("match() 1st",      null,  single1.match(value));
-        checkArray("match() 2nd",      array, single2.match(value));
-        checkArray("match() 3rd",      null,  single3.match(value));
+        assertArrayEquals(array, multiple.match(value), "match() Multiple");
+        assertNull(single1.match(value), "match() 1st");
+        assertArrayEquals(array, single2.match(value), "match() 2nd");
+        assertNull(single3.match(value), "match() 3rd");
 
         // All invalid
         value = "AAC*FDE*321";
-        assertFalse("isValid() Invalid", multiple.isValid(value));
-        assertNull("validate() Invalid", multiple.validate(value));
-        assertNull("match() Multiple",   multiple.match(value));
+        assertFalse(multiple.isValid(value), "isValid() Invalid");
+        assertNull(multiple.validate(value), "validate() Invalid");
+        assertNull(multiple.match(value), "match() Multiple");
     }
 
@@ -170,7 +173,7 @@
     void testNullValue() {
         RegexValidator validator = new RegexValidator(REGEX);
-        assertFalse("Instance isValid()", validator.isValid(null));
-        assertNull("Instance validate()", validator.validate(null));
-        assertNull("Instance match()",    validator.match(null));
+        assertFalse(validator.isValid(null), "Instance isValid()");
+        assertNull(validator.validate(null), "Instance validate()");
+        assertNull(validator.match(null), "Instance match()");
     }
 
@@ -182,54 +185,33 @@
     @Test
     void testMissingRegex() {
-
         // Single Regular Expression - null
-        try {
-            new RegexValidator((String) null);
-            fail("Single Null - expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Single Null", "Regular expression[0] is missing", e.getMessage());
-        }
+        IllegalArgumentException iae = assertThrows(IllegalArgumentException.class, () -> new RegexValidator((String) null),
+                "Single Null - expected IllegalArgumentException");
+        assertEquals("Regular expression[0] is missing", iae.getMessage(), "Single Null");
 
         // Single Regular Expression - Zero Length
-        try {
-            new RegexValidator("");
-            fail("Single Zero Length - expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Single Zero Length", "Regular expression[0] is missing", e.getMessage());
-        }
+        iae = assertThrows(IllegalArgumentException.class, () -> new RegexValidator(""),
+                "Single Zero Length - expected IllegalArgumentException");
+        assertEquals("Regular expression[0] is missing", iae.getMessage(), "Single Zero Length");
 
         // Multiple Regular Expression - Null array
-        try {
-            new RegexValidator((String[]) null);
-            fail("Null Array - expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Null Array", "Regular expressions are missing", e.getMessage());
-        }
+        iae = assertThrows(IllegalArgumentException.class, () -> new RegexValidator((String[]) null),
+                "Null Array - expected IllegalArgumentException");
+        assertEquals("Regular expressions are missing", iae.getMessage(), "Null Array");
 
         // Multiple Regular Expression - Zero Length array
-        try {
-            new RegexValidator(new String[0]);
-            fail("Zero Length Array - expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Zero Length Array", "Regular expressions are missing", e.getMessage());
-        }
+        iae = assertThrows(IllegalArgumentException.class, RegexValidator::new,
+                "Zero Length Array - expected IllegalArgumentException");
+        assertEquals("Regular expressions are missing", iae.getMessage(), "Zero Length Array");
 
         // Multiple Regular Expression - Array has Null
-        String[] expressions = new String[] {"ABC", null};
-        try {
-            new RegexValidator(expressions);
-            fail("Array has Null - expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Array has Null", "Regular expression[1] is missing", e.getMessage());
-        }
+        iae = assertThrows(IllegalArgumentException.class, () -> new RegexValidator("ABC", null),
+                "Array has Null - expected IllegalArgumentException");
+        assertEquals("Regular expression[1] is missing", iae.getMessage(), "Array has Null");
 
         // Multiple Regular Expression - Array has Zero Length
-        expressions = new String[] {"", "ABC"};
-        try {
-            new RegexValidator(expressions);
-            fail("Array has Zero Length - expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Array has Zero Length", "Regular expression[0] is missing", e.getMessage());
-        }
+        iae = assertThrows(IllegalArgumentException.class, () -> new RegexValidator("", "ABC"),
+                "Array has Zero Length - expected IllegalArgumentException");
+        assertEquals("Regular expression[0] is missing", iae.getMessage(), "Array has Zero Length");
     }
 
@@ -254,8 +236,8 @@
     void testToString() {
         RegexValidator single = new RegexValidator(REGEX);
-        assertEquals("Single", "RegexValidator{" + REGEX + "}", single.toString());
-
-        RegexValidator multiple = new RegexValidator(new String[] {REGEX, REGEX});
-        assertEquals("Multiple", "RegexValidator{" + REGEX + "," + REGEX + "}", multiple.toString());
+        assertEquals("RegexValidator{" + REGEX + "}", single.toString(), "Single");
+
+        RegexValidator multiple = new RegexValidator(REGEX, REGEX);
+        assertEquals("RegexValidator{" + REGEX + "," + REGEX + "}", multiple.toString(), "Multiple");
     }
 
@@ -268,31 +250,3 @@
     }
 
-    /**
-     * Compare two arrays
-     * @param label Label for the test
-     * @param expect Expected array
-     * @param result Actual array
-     */
-    private void checkArray(String label, String[] expect, String[] result) {
-
-        // Handle nulls
-        if (expect == null || result == null) {
-            if (expect == null && result == null) {
-                return; // valid, both null
-            } else {
-                fail(label + " Null expect=" + Arrays.toString(expect) + " result=" + Arrays.toString(result));
-            }
-            return; // not strictly necessary, but prevents possible NPE below
-        }
-
-        // Check Length
-        if (expect.length != result.length) {
-            fail(label + " Length expect=" + expect.length + " result=" + result.length);
-        }
-
-        // Check Values
-        for (int i = 0; i < expect.length; i++) {
-            assertEquals(label +" value[" + i + "]", expect[i], result[i]);
-        }
-    }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java	(revision 18690)
@@ -17,7 +17,7 @@
 package org.openstreetmap.josm.data.validation.routines;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import org.junit.jupiter.api.BeforeEach;
@@ -48,5 +48,5 @@
      */
     @Test
-    public void testIsValid() {
+    void testIsValid() {
         testIsValid(testUrlParts, UrlValidator.ALLOW_ALL_SCHEMES);
         setUp();
@@ -63,5 +63,5 @@
      */
     @Test
-    public void testIsValidScheme() {
+    void testIsValidScheme() {
         if (printStatus) {
             System.out.print("\n testIsValidScheme() ");
@@ -71,5 +71,5 @@
         for (ResultPair testPair : testScheme) {
             boolean result = urlVal.isValidScheme(testPair.item);
-            assertEquals(testPair.item, testPair.valid, result);
+            assertEquals(testPair.valid, result, testPair.item);
             if (printStatus) {
                 if (result == testPair.valid) {
@@ -112,5 +112,5 @@
             String url = testBuffer.toString();
             boolean result = urlVal.isValid(url);
-            assertEquals(url, expected, result);
+            assertEquals(expected, result, url);
             if (printStatus) {
                 if (printIndex) {
@@ -164,6 +164,5 @@
     void testValidator218() {
         UrlValidator validator = new UrlValidator(UrlValidator.ALLOW_2_SLASHES);
-        assertTrue("parentheses should be valid in URLs",
-                validator.isValid("http://somewhere.com/pathxyz/file(1).html"));
+        assertTrue(validator.isValid("http://somewhere.com/pathxyz/file(1).html"), "parentheses should be valid in URLs");
     }
 
@@ -179,10 +178,10 @@
         }
         UrlValidator validator = new UrlValidator();
-        assertTrue("xn--d1abbgf6aiiy.xn--p1ai should validate", validator.isValid("http://xn--d1abbgf6aiiy.xn--p1ai"));
-        assertTrue("президент.рф should validate", validator.isValid("http://президент.рф"));
-        assertTrue("www.b\u00fccher.ch should validate", validator.isValid("http://www.b\u00fccher.ch"));
-        assertFalse("www.\uFFFD.ch FFFD should fail", validator.isValid("http://www.\uFFFD.ch"));
-        assertTrue("www.b\u00fccher.ch should validate", validator.isValid("ftp://www.b\u00fccher.ch"));
-        assertFalse("www.\uFFFD.ch FFFD should fail", validator.isValid("ftp://www.\uFFFD.ch"));
+        assertTrue(validator.isValid("http://xn--d1abbgf6aiiy.xn--p1ai"), "xn--d1abbgf6aiiy.xn--p1ai should validate");
+        assertTrue(validator.isValid("http://президент.рф"), "президент.рф should validate");
+        assertTrue(validator.isValid("http://www.b\u00fccher.ch"), "www.b\u00fccher.ch should validate");
+        assertFalse(validator.isValid("http://www.\uFFFD.ch"), "www.\uFFFD.ch FFFD should fail");
+        assertTrue(validator.isValid("ftp://www.b\u00fccher.ch"), "www.b\u00fccher.ch should validate");
+        assertFalse(validator.isValid("ftp://www.\uFFFD.ch"), "www.\uFFFD.ch FFFD should fail");
     }
 
@@ -195,28 +194,20 @@
         UrlValidator validator = new UrlValidator(regex, 0);
 
-        assertTrue("localhost URL should validate",
-                validator.isValid("http://localhost/test/index.html"));
-        assertTrue("first.my-testing should validate",
-                validator.isValid("http://first.my-testing/test/index.html"));
-        assertTrue("sup3r.my-testing should validate",
-                validator.isValid("http://sup3r.my-testing/test/index.html"));
-
-        assertFalse("broke.my-test should not validate",
-                validator.isValid("http://broke.my-test/test/index.html"));
-
-        assertTrue("www.apache.org should still validate",
-                validator.isValid("http://www.apache.org/test/index.html"));
+        assertTrue(validator.isValid("http://localhost/test/index.html"), "localhost URL should validate");
+        assertTrue(validator.isValid("http://first.my-testing/test/index.html"), "first.my-testing should validate");
+        assertTrue(validator.isValid("http://sup3r.my-testing/test/index.html"), "sup3r.my-testing should validate");
+
+        assertFalse(validator.isValid("http://broke.my-test/test/index.html"), "broke.my-test should not validate");
+
+        assertTrue(validator.isValid("http://www.apache.org/test/index.html"), "www.apache.org should still validate");
 
         // Now check using options
         validator = new UrlValidator(UrlValidator.ALLOW_LOCAL_URLS);
 
-        assertTrue("localhost URL should validate",
-                validator.isValid("http://localhost/test/index.html"));
-
-        assertTrue("machinename URL should validate",
-                validator.isValid("http://machinename/test/index.html"));
-
-        assertTrue("www.apache.org should still validate",
-                validator.isValid("http://www.apache.org/test/index.html"));
+        assertTrue(validator.isValid("http://localhost/test/index.html"), "localhost URL should validate");
+
+        assertTrue(validator.isValid("http://machinename/test/index.html"), "machinename URL should validate");
+
+        assertTrue(validator.isValid("http://www.apache.org/test/index.html"), "www.apache.org should still validate");
     }
 
@@ -228,33 +219,24 @@
         UrlValidator validator = new UrlValidator(UrlValidator.ALLOW_LOCAL_URLS);
 
-        assertTrue("hostname should validate",
-                validator.isValid("http://hostname"));
-
-        assertTrue("hostname with path should validate",
-                validator.isValid("http://hostname/test/index.html"));
-
-        assertTrue("localhost URL should validate",
-                validator.isValid("http://localhost/test/index.html"));
-
-        assertFalse("first.my-testing should not validate",
-                validator.isValid("http://first.my-testing/test/index.html"));
-
-        assertFalse("broke.hostname should not validate",
-                validator.isValid("http://broke.hostname/test/index.html"));
-
-        assertTrue("www.apache.org should still validate",
-                validator.isValid("http://www.apache.org/test/index.html"));
+        assertTrue(validator.isValid("http://hostname"), "hostname should validate");
+
+        assertTrue(validator.isValid("http://hostname/test/index.html"), "hostname with path should validate");
+
+        assertTrue(validator.isValid("http://localhost/test/index.html"), "localhost URL should validate");
+
+        assertFalse(validator.isValid("http://first.my-testing/test/index.html"), "first.my-testing should not validate");
+
+        assertFalse(validator.isValid("http://broke.hostname/test/index.html"), "broke.hostname should not validate");
+
+        assertTrue(validator.isValid("http://www.apache.org/test/index.html"), "www.apache.org should still validate");
 
         // Turn it off, and check
         validator = new UrlValidator(0);
 
-        assertFalse("hostname should no longer validate",
-                validator.isValid("http://hostname"));
-
-        assertFalse("localhost URL should no longer validate",
-                validator.isValid("http://localhost/test/index.html"));
-
-        assertTrue("www.apache.org should still validate",
-                validator.isValid("http://www.apache.org/test/index.html"));
+        assertFalse(validator.isValid("http://hostname"), "hostname should no longer validate");
+
+        assertFalse(validator.isValid("http://localhost/test/index.html"), "localhost URL should no longer validate");
+
+        assertTrue(validator.isValid("http://www.apache.org/test/index.html"), "www.apache.org should still validate");
     }
 
@@ -267,21 +249,15 @@
         UrlValidator validator = new UrlValidator();
 
-        assertTrue("http://apache.org/ should be allowed by default",
-                validator.isValid("http://www.apache.org/test/index.html"));
-
-        assertFalse("file:///c:/ shouldn't be allowed by default",
-                validator.isValid("file:///C:/some.file"));
-
-        assertFalse("file:///c:\\ shouldn't be allowed by default",
-                validator.isValid("file:///C:\\some.file"));
-
-        assertFalse("file:///etc/ shouldn't be allowed by default",
-                validator.isValid("file:///etc/hosts"));
-
-        assertFalse("file://localhost/etc/ shouldn't be allowed by default",
-                validator.isValid("file://localhost/etc/hosts"));
-
-        assertFalse("file://localhost/c:/ shouldn't be allowed by default",
-                validator.isValid("file://localhost/c:/some.file"));
+        assertTrue(validator.isValid("http://www.apache.org/test/index.html"), "http://apache.org/ should be allowed by default");
+
+        assertFalse(validator.isValid("file:///C:/some.file"), "file:///c:/ shouldn't be allowed by default");
+
+        assertFalse(validator.isValid("file:///C:\\some.file"), "file:///c:\\ shouldn't be allowed by default");
+
+        assertFalse(validator.isValid("file:///etc/hosts"), "file:///etc/ shouldn't be allowed by default");
+
+        assertFalse(validator.isValid("file://localhost/etc/hosts"), "file://localhost/etc/ shouldn't be allowed by default");
+
+        assertFalse(validator.isValid("file://localhost/c:/some.file"), "file://localhost/c:/ shouldn't be allowed by default");
 
         // Turn it on, and check
@@ -289,29 +265,21 @@
         validator = new UrlValidator(new String[]{"http", "file"}, UrlValidator.ALLOW_LOCAL_URLS);
 
-        assertTrue("http://apache.org/ should be allowed by default",
-                validator.isValid("http://www.apache.org/test/index.html"));
-
-        assertTrue("file:///c:/ should now be allowed",
-                validator.isValid("file:///C:/some.file"));
+        assertTrue(validator.isValid("http://www.apache.org/test/index.html"), "http://apache.org/ should be allowed by default");
+
+        assertTrue(validator.isValid("file:///C:/some.file"), "file:///c:/ should now be allowed");
 
         // Currently, we don't support the c:\ form
-        assertFalse("file:///c:\\ shouldn't be allowed",
-                validator.isValid("file:///C:\\some.file"));
-
-        assertTrue("file:///etc/ should now be allowed",
-                validator.isValid("file:///etc/hosts"));
-
-        assertTrue("file://localhost/etc/ should now be allowed",
-                validator.isValid("file://localhost/etc/hosts"));
-
-        assertTrue("file://localhost/c:/ should now be allowed",
-                validator.isValid("file://localhost/c:/some.file"));
+        assertFalse(validator.isValid("file:///C:\\some.file"), "file:///c:\\ shouldn't be allowed");
+
+        assertTrue(validator.isValid("file:///etc/hosts"), "file:///etc/ should now be allowed");
+
+        assertTrue(validator.isValid("file://localhost/etc/hosts"), "file://localhost/etc/ should now be allowed");
+
+        assertTrue(validator.isValid("file://localhost/c:/some.file"), "file://localhost/c:/ should now be allowed");
 
         // These are never valid
-        assertFalse("file://c:/ shouldn't ever be allowed, needs file:///c:/",
-                validator.isValid("file://C:/some.file"));
-
-        assertFalse("file://c:\\ shouldn't ever be allowed, needs file:///c:/",
-                validator.isValid("file://C:\\some.file"));
+        assertFalse(validator.isValid("file://C:/some.file"), "file://c:/ shouldn't ever be allowed, needs file:///c:/");
+
+        assertFalse(validator.isValid("file://C:\\some.file"), "file://c:\\ shouldn't ever be allowed, needs file:///c:/");
     }
 
@@ -406,5 +374,5 @@
      */
     @Test
-    public void testValidator290() {
+    void testValidator290() {
         UrlValidator validator = new UrlValidator();
         assertTrue(validator.isValid("http://xn--h1acbxfam.idn.icann.org/"));
@@ -447,5 +415,5 @@
      */
     @Test
-    public void testValidator361() {
+    void testValidator361() {
         UrlValidator validator = new UrlValidator();
         assertTrue(validator.isValid("http://hello.tokyo/"));
@@ -456,5 +424,5 @@
      */
     @Test
-    public void testValidator363() {
+    void testValidator363() {
         UrlValidator urlValidator = new UrlValidator();
         assertTrue(urlValidator.isValid("http://www.example.org/a/b/hello..world"));
@@ -480,12 +448,12 @@
      */
     @Test
-    public void testValidator375() {
+    void testValidator375() {
         UrlValidator validator = new UrlValidator();
         String url = "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html";
-        assertTrue("IPv6 address URL should validate: " + url, validator.isValid(url));
+        assertTrue(validator.isValid(url), "IPv6 address URL should validate: " + url);
         url = "http://[::1]:80/index.html";
-        assertTrue("IPv6 address URL should validate: " + url, validator.isValid(url));
+        assertTrue(validator.isValid(url), "IPv6 address URL should validate: " + url);
         url = "http://FEDC:BA98:7654:3210:FEDC:BA98:7654:3210:80/index.html";
-        assertFalse("IPv6 address without [] should not validate: " + url, validator.isValid(url));
+        assertFalse(validator.isValid(url), "IPv6 address without [] should not validate: " + url);
     }
 
@@ -494,5 +462,5 @@
      */
     @Test
-    public void testValidator353() { // userinfo
+    void testValidator353() { // userinfo
         UrlValidator validator = new UrlValidator();
         assertTrue(validator.isValid("http://www.apache.org:80/path"));
@@ -510,5 +478,5 @@
      */
     @Test
-    public void testValidator382() {
+    void testValidator382() {
         UrlValidator validator = new UrlValidator();
         assertTrue(validator.isValid("ftp://username:password@example.com:8042/over/there/index.dtb?type=animal&name=narwhal#nose"));
@@ -519,5 +487,5 @@
      */
     @Test
-    public void testValidator380() {
+    void testValidator380() {
         UrlValidator validator = new UrlValidator();
         assertTrue(validator.isValid("http://www.apache.org:80/path"));
@@ -530,5 +498,5 @@
      */
     @Test
-    public void testValidatorName() {
+    void testValidatorName() {
         assertEquals("URL validator", UrlValidator.getInstance().getValidatorName());
     }
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ConnectivityRelationsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ConnectivityRelationsTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ConnectivityRelationsTest.java	(revision 18690)
@@ -2,5 +2,6 @@
 package org.openstreetmap.josm.data.validation.tests;
 
-import org.junit.Assert;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -32,5 +33,5 @@
 
     @BeforeEach
-    public void setUpCheck() throws Exception {
+    public void setUpCheck() {
         check = new ConnectivityRelations();
     }
@@ -52,9 +53,9 @@
         check.visit(relation);
 
-        Assert.assertEquals(0, check.getErrors().size());
+        assertEquals(0, check.getErrors().size());
 
         relation.remove(CONNECTIVITY);
         check.visit(relation);
-        Assert.assertEquals(1, check.getErrors().size());
+        assertEquals(1, check.getErrors().size());
     }
 
@@ -68,46 +69,45 @@
         int expectedFailures = 0;
 
-        Assert.assertEquals(expectedFailures, check.getErrors().size());
+        assertEquals(expectedFailures, check.getErrors().size());
 
         relation.put(CONNECTIVITY, "45000:1");
         check.visit(relation);
-        Assert.assertEquals(++expectedFailures, check.getErrors().size());
+        assertEquals(++expectedFailures, check.getErrors().size());
 
         relation.put(CONNECTIVITY, "1:45000");
         check.visit(relation);
-        Assert.assertEquals(++expectedFailures, check.getErrors().size());
+        assertEquals(++expectedFailures, check.getErrors().size());
 
         relation.put(CONNECTIVITY, "1:1,2");
         check.visit(relation);
-        Assert.assertEquals(expectedFailures, check.getErrors().size());
+        assertEquals(expectedFailures, check.getErrors().size());
 
         relation.put(CONNECTIVITY, "1:1,(2)");
         check.visit(relation);
-        Assert.assertEquals(expectedFailures, check.getErrors().size());
+        assertEquals(expectedFailures, check.getErrors().size());
 
         relation.put(CONNECTIVITY, "1:1,(20000)");
         check.visit(relation);
-        Assert.assertEquals(++expectedFailures, check.getErrors().size());
+        assertEquals(++expectedFailures, check.getErrors().size());
     }
 
     /**
      * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/201821">Bug #20182</a>.
-     * @throws Exception if an error occurs
      */
     @Test
-    void testTicket20182() throws Exception {
+    void testTicket20182() {
         Relation relation = createDefaultTestRelation();
         check.visit(relation);
         int expectedFailures = 0;
 
-        Assert.assertEquals(expectedFailures, check.getErrors().size());
+        assertEquals(expectedFailures, check.getErrors().size());
 
         relation.put(CONNECTIVITY, "left_turn");
         check.visit(relation);
-        Assert.assertEquals(++expectedFailures, check.getErrors().size());
+        assertEquals(++expectedFailures, check.getErrors().size());
 
         relation.put(CONNECTIVITY, "1");
         check.visit(relation);
-        Assert.assertEquals(++expectedFailures, check.getErrors().size());
+        assertEquals(++expectedFailures, check.getErrors().size());
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DirectionNodesTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DirectionNodesTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DirectionNodesTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -28,5 +29,5 @@
     void testDirectionsNodesTestFile() throws Exception {
         final DirectionNodes test = new DirectionNodes();
-        ValidatorTestUtils.testSampleFile("nodist/data/direction-nodes.osm", ds -> ds.getNodes(), null, test);
+        ValidatorTestUtils.testSampleFile("nodist/data/direction-nodes.osm", DataSet::getNodes, null, test);
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -129,8 +130,8 @@
                 "}")).parseChecks.get(0);
         final Command command = check.fixPrimitive(p);
-        assertTrue(command instanceof SequenceCommand);
+        assertInstanceOf(SequenceCommand.class, command);
         final Iterator<PseudoCommand> it = command.getChildren().iterator();
-        assertTrue(it.next() instanceof ChangePropertyKeyCommand);
-        assertTrue(it.next() instanceof ChangePropertyCommand);
+        assertInstanceOf(ChangePropertyKeyCommand.class, it.next());
+        assertInstanceOf(ChangePropertyCommand.class, it.next());
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java	(revision 18690)
@@ -7,4 +7,5 @@
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -258,6 +259,5 @@
     private static void assertFixEquals(String value, TestError error) {
         assertNotNull(error.getFix(), "fix is not null");
-        assertTrue(error.getFix() instanceof ChangePropertyCommand, "fix is ChangePropertyCommand");
-        final ChangePropertyCommand command = (ChangePropertyCommand) error.getFix();
+        final ChangePropertyCommand command = assertInstanceOf(ChangePropertyCommand.class, error.getFix(), "fix is ChangePropertyCommand");
         assertEquals(1, command.getTags().size());
         assertEquals(value, command.getTags().values().iterator().next());
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWayTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWayTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWayTest.java	(revision 18690)
@@ -2,12 +2,18 @@
 package org.openstreetmap.josm.data.validation.tests;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -59,14 +65,46 @@
         SelfIntersectingWay test = new SelfIntersectingWay();
         test.visit(w);
-        Assert.assertEquals(1, test.getErrors().size());
-        Assert.assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(1)));
-    }
-
-    /**
-     * First node is identical to an inner node ("P"-Shape).
+        assertEquals(1, test.getErrors().size());
+        assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(1)));
+    }
+
+    static List<Arguments> testOkInnerNode() {
+        // The first two are duplicates
+        return Arrays.asList(
+                Arguments.of("testUnclosedWayFirst - First node is identical to an inner node (\"P\"-Shape)",
+                        new int[] {0, 1, 2, 0 /* problem */, 3, 4}),
+                Arguments.of("testUnclosedWayFirstRepeated - First node is identical to an inner node (\"P\"-Shape)",
+                        new int[] {0, 1, 2, 0 /* problem */, 3, 4}),
+                Arguments.of("testUnclosedWayLast - Last node is identical to an inner node (\"b\"-Shape)",
+                        new int[] {0, 1 /* problem */, 2, 3, 4, 1})
+        );
+    }
+
+    /**
+     * The starting or ending nodes are also an inner node.
      * This is considered okay.
      */
-    @Test
-    void testUnclosedWayFirst() {
+    @ParameterizedTest(name = "{0}")
+    @MethodSource("testOkInnerNode")
+    void testUnclosedWayFirst(String description, int[] nodeIndex) {
+        List<Node> nodes = createNodes();
+
+        Way w = (Way) OsmUtils.createPrimitive("way ");
+        List<Node> wayNodes = new ArrayList<>(nodeIndex.length);
+        for (int i : nodeIndex) {
+            wayNodes.add(nodes.get(i));
+        }
+        w.setNodes(wayNodes);
+        SelfIntersectingWay test = new SelfIntersectingWay();
+        test.visit(w);
+        assertEquals(0, test.getErrors().size());
+    }
+
+    /**
+     * Both endpoints join at one inner node ("8"-shape).
+     * This is considered to be an error.
+     */
+    @Test
+    void testClosedWay() {
         List<Node> nodes = createNodes();
 
@@ -79,67 +117,24 @@
         wayNodes.add(nodes.get(3));
         wayNodes.add(nodes.get(4));
-        w.setNodes(wayNodes);
-        SelfIntersectingWay test = new SelfIntersectingWay();
-        test.visit(w);
-        Assert.assertEquals(0, test.getErrors().size());
-    }
-
-    /**
-     * First node is identical to an inner node ("P"-Shape).
-     * This is considered okay.
-     */
-    @Test
-    void testUnclosedWayFirstRepeated() {
-        List<Node> nodes = createNodes();
-
-        Way w = (Way) OsmUtils.createPrimitive("way ");
-        List<Node> wayNodes = new ArrayList<>();
-        wayNodes.add(nodes.get(0));
-        wayNodes.add(nodes.get(1));
-        wayNodes.add(nodes.get(2));
-        wayNodes.add(nodes.get(0));
-        wayNodes.add(nodes.get(3));
-        wayNodes.add(nodes.get(4));
-        w.setNodes(wayNodes);
-        SelfIntersectingWay test = new SelfIntersectingWay();
-        test.visit(w);
-        Assert.assertEquals(0, test.getErrors().size());
-    }
-
-    /**
-     * Last node is identical to an inner node ("b"-Shape).
-     * This is considered okay.
-     */
-    @Test
-    void testUnclosedWayLast() {
-        List<Node> nodes = createNodes();
-
-        Way w = (Way) OsmUtils.createPrimitive("way ");
-        List<Node> wayNodes = new ArrayList<>();
-        wayNodes.add(nodes.get(0));
-        wayNodes.add(nodes.get(1)); // problem node
-        wayNodes.add(nodes.get(2));
-        wayNodes.add(nodes.get(3));
-        wayNodes.add(nodes.get(4));
-        wayNodes.add(nodes.get(1));
-        w.setNodes(wayNodes);
-        SelfIntersectingWay test = new SelfIntersectingWay();
-        test.visit(w);
-        Assert.assertEquals(0, test.getErrors().size());
-    }
-
-    /**
-     * Both endpoints join at one inner node ("8"-shape).
-     * This is considered to be an error.
-     */
-    @Test
-    void testClosedWay() {
-        List<Node> nodes = createNodes();
-
-        Way w = (Way) OsmUtils.createPrimitive("way ");
-        List<Node> wayNodes = new ArrayList<>();
-        wayNodes.add(nodes.get(0));
-        wayNodes.add(nodes.get(1));
-        wayNodes.add(nodes.get(2));
+        wayNodes.add(nodes.get(0));
+        w.setNodes(wayNodes);
+        SelfIntersectingWay test = new SelfIntersectingWay();
+        test.visit(w);
+        assertEquals(1, test.getErrors().size());
+        assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(0)));
+    }
+
+    /**
+     * Closed way contains a spike.
+     * This is considered to be an error.
+     */
+    @Test
+    void testSpikeWithStartInClosedWay() {
+        List<Node> nodes = createNodes();
+
+        Way w = (Way) OsmUtils.createPrimitive("way ");
+        List<Node> wayNodes = new ArrayList<>();
+        wayNodes.add(nodes.get(0));
+        wayNodes.add(nodes.get(1));
         wayNodes.add(nodes.get(0)); // problem
         wayNodes.add(nodes.get(3));
@@ -149,6 +144,6 @@
         SelfIntersectingWay test = new SelfIntersectingWay();
         test.visit(w);
-        Assert.assertEquals(1, test.getErrors().size());
-        Assert.assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(0)));
+        assertEquals(1, test.getErrors().size());
+        assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(0)));
     }
 
@@ -158,20 +153,20 @@
      */
     @Test
-    void testSpikeWithStartInClosedWay() {
-        List<Node> nodes = createNodes();
-
-        Way w = (Way) OsmUtils.createPrimitive("way ");
-        List<Node> wayNodes = new ArrayList<>();
-        wayNodes.add(nodes.get(0));
-        wayNodes.add(nodes.get(1));
+    void testSpikeWithEndInClosedWay() {
+        List<Node> nodes = createNodes();
+
+        Way w = (Way) OsmUtils.createPrimitive("way ");
+        List<Node> wayNodes = new ArrayList<>();
+        wayNodes.add(nodes.get(0));
+        wayNodes.add(nodes.get(1));
+        wayNodes.add(nodes.get(2));
         wayNodes.add(nodes.get(0)); // problem
         wayNodes.add(nodes.get(3));
-        wayNodes.add(nodes.get(4));
-        wayNodes.add(nodes.get(0));
-        w.setNodes(wayNodes);
-        SelfIntersectingWay test = new SelfIntersectingWay();
-        test.visit(w);
-        Assert.assertEquals(1, test.getErrors().size());
-        Assert.assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(0)));
+        wayNodes.add(nodes.get(0));
+        w.setNodes(wayNodes);
+        SelfIntersectingWay test = new SelfIntersectingWay();
+        test.visit(w);
+        assertEquals(1, test.getErrors().size());
+        assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(0)));
     }
 
@@ -181,27 +176,4 @@
      */
     @Test
-    void testSpikeWithEndInClosedWay() {
-        List<Node> nodes = createNodes();
-
-        Way w = (Way) OsmUtils.createPrimitive("way ");
-        List<Node> wayNodes = new ArrayList<>();
-        wayNodes.add(nodes.get(0));
-        wayNodes.add(nodes.get(1));
-        wayNodes.add(nodes.get(2));
-        wayNodes.add(nodes.get(0)); // problem
-        wayNodes.add(nodes.get(3));
-        wayNodes.add(nodes.get(0));
-        w.setNodes(wayNodes);
-        SelfIntersectingWay test = new SelfIntersectingWay();
-        test.visit(w);
-        Assert.assertEquals(1, test.getErrors().size());
-        Assert.assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(0)));
-    }
-
-    /**
-     * Closed way contains a spike.
-     * This is considered to be an error.
-     */
-    @Test
     void testSpikeInClosedWay() {
         List<Node> nodes = createNodes();
@@ -218,6 +190,6 @@
         SelfIntersectingWay test = new SelfIntersectingWay();
         test.visit(w);
-        Assert.assertEquals(1, test.getErrors().size());
-        Assert.assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(2)));
+        assertEquals(1, test.getErrors().size());
+        assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(2)));
     }
 
@@ -243,6 +215,6 @@
         SelfIntersectingWay test = new SelfIntersectingWay();
         test.visit(w);
-        Assert.assertEquals(1, test.getErrors().size());
-        Assert.assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(3)));
+        assertEquals(1, test.getErrors().size());
+        assertTrue(test.getErrors().iterator().next().getHighlighted().contains(nodes.get(3)));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java	(revision 18690)
@@ -11,5 +11,5 @@
 import java.util.stream.Collectors;
 
-import org.junit.Assert;
+import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
@@ -266,5 +266,5 @@
 
     private static void doTestUnwantedNonprintingControlCharacters(String s) {
-        doTestUnwantedNonprintingControlCharacters(s, Assert::assertTrue, "");
+        doTestUnwantedNonprintingControlCharacters(s, Assertions::assertTrue, "");
     }
 
@@ -276,5 +276,5 @@
     void testContainsRemoveUnwantedNonprintingControlCharacters() {
         // Check empty string is handled
-        doTestUnwantedNonprintingControlCharacters("", Assert::assertFalse, "");
+        doTestUnwantedNonprintingControlCharacters("", Assertions::assertFalse, "");
         // Check 65 ASCII control characters are removed, except new lines
         for (char c = 0x0; c < 0x20; c++) {
@@ -282,5 +282,5 @@
                 doTestUnwantedNonprintingControlCharacters(Character.toString(c));
             } else {
-                doTestUnwantedNonprintingControlCharacters(Character.toString(c), Assert::assertFalse, Character.toString(c));
+                doTestUnwantedNonprintingControlCharacters(Character.toString(c), Assertions::assertFalse, Character.toString(c));
             }
         }
@@ -298,10 +298,10 @@
             doTestUnwantedNonprintingControlCharacters(s);
             doTestUnwantedNonprintingControlCharacters(s + s);
-            doTestUnwantedNonprintingControlCharacters(s + 'a' + s, Assert::assertTrue, "a");
+            doTestUnwantedNonprintingControlCharacters(s + 'a' + s, Assertions::assertTrue, "a");
             final String ok = 'a' + s + 'b';
-            doTestUnwantedNonprintingControlCharacters(ok, Assert::assertFalse, ok);
-            doTestUnwantedNonprintingControlCharacters(s + ok, Assert::assertTrue, ok);
-            doTestUnwantedNonprintingControlCharacters(ok + s, Assert::assertTrue, ok);
-            doTestUnwantedNonprintingControlCharacters(s + ok + s, Assert::assertTrue, ok);
+            doTestUnwantedNonprintingControlCharacters(ok, Assertions::assertFalse, ok);
+            doTestUnwantedNonprintingControlCharacters(s + ok, Assertions::assertTrue, ok);
+            doTestUnwantedNonprintingControlCharacters(ok + s, Assertions::assertTrue, ok);
+            doTestUnwantedNonprintingControlCharacters(s + ok + s, Assertions::assertTrue, ok);
         }
     }
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TurnRestrictionTestTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TurnRestrictionTestTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TurnRestrictionTestTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -30,5 +31,5 @@
     void testTurnrestrictionFile() throws Exception {
         ValidatorTestUtils.testSampleFile("nodist/data/restriction.osm",
-                ds -> ds.getRelations(),
+                DataSet::getRelations,
                 name -> name.startsWith("E"), TURNRESTRICTION_TEST, RELATION_TEST);
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java	(revision 18690)
@@ -5,4 +5,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
@@ -125,10 +126,5 @@
         try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
             System.setOut(new PrintStream(baos));
-            Thread t = new Thread() {
-                @Override
-                public void run() {
-                    MainApplication.main(new String[] {arg});
-                }
-            };
+            Thread t = new Thread(() -> MainApplication.main(new String[] {arg}));
             t.start();
             t.join();
@@ -229,5 +225,5 @@
                     .until(() -> !BugReportQueue.getInstance().exceptionHandlingInProgress());
             assertNotNull(exceptionAtomicReference.get());
-            assertTrue(exceptionAtomicReference.get() instanceof UnsupportedOperationException);
+            assertInstanceOf(UnsupportedOperationException.class, exceptionAtomicReference.get());
             // The LAF only resets on restart, so don't bother checking that it switched back in UIManager
             assertEquals(LafPreference.LAF.getDefaultValue(), LafPreference.LAF.get());
@@ -253,13 +249,12 @@
     void testPostConstructorProcessCmdLineEmpty() {
         // Check the method accepts no arguments
-        MainApplication.postConstructorProcessCmdLine(new ProgramArguments(new String[0]));
+        MainApplication.postConstructorProcessCmdLine(new ProgramArguments());
     }
 
     private static void doTestPostConstructorProcessCmdLine(String download, String downloadGps, boolean gpx) {
         assertNull(MainApplication.getLayerManager().getEditDataSet());
-        for (Future<?> f : MainApplication.postConstructorProcessCmdLine(new ProgramArguments(new String[]{
-                "--download=" + download,
+        for (Future<?> f : MainApplication.postConstructorProcessCmdLine(new ProgramArguments("--download=" + download,
                 "--downloadgps=" + downloadGps,
-                "--selection=type: node"}))) {
+                "--selection=type: node"))) {
             try {
                 f.get();
@@ -314,8 +309,7 @@
     /**
      * Unit test of {@link MainApplication#postConstructorProcessCmdLine} - nominal case with file names.
-     * @throws MalformedURLException if an error occurs
-     */
-    @Test
-    void testPostConstructorProcessCmdLineFilename() throws MalformedURLException {
+     */
+    @Test
+    void testPostConstructorProcessCmdLineFilename() {
         doTestPostConstructorProcessCmdLine(
                 Paths.get(TestUtils.getTestDataRoot() + "multipolygon.osm").toFile().getAbsolutePath(),
Index: trunk/test/unit/org/openstreetmap/josm/gui/MapViewStateTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/MapViewStateTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/MapViewStateTest.java	(revision 18690)
@@ -65,5 +65,5 @@
     @Test
     void testGetCenter() {
-        doTestGetCenter(s -> s.getCenter(), t -> t / 2d);
+        doTestGetCenter(MapViewState::getCenter, t -> t / 2d);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java	(revision 18690)
@@ -101,9 +101,9 @@
         assertThat(component.getPoint2D((EastNorth) null), CustomMatchers.is(new Point2D.Double()));
         Point2D shouldBeCenter = component.getPoint2D(component.getCenter());
-        assertThat(shouldBeCenter, CustomMatchers.is(new Point2D.Double(WIDTH / 2, HEIGHT / 2)));
+        assertThat(shouldBeCenter, CustomMatchers.is(new Point2D.Double(WIDTH / 2.0, HEIGHT / 2.0)));
 
         EastNorth testPoint = component.getCenter().add(300 * component.getScale(), 200 * component.getScale());
         Point2D testPointConverted = component.getPoint2D(testPoint);
-        assertThat(testPointConverted, CustomMatchers.is(new Point2D.Double(WIDTH / 2 + 300, HEIGHT / 2 - 200)));
+        assertThat(testPointConverted, CustomMatchers.is(new Point2D.Double(WIDTH / 2.0 + 300, HEIGHT / 2.0 - 200)));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java	(revision 18690)
@@ -3,4 +3,5 @@
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.lang.reflect.Constructor;
@@ -14,5 +15,4 @@
 import javax.swing.table.TableCellRenderer;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
@@ -64,5 +64,5 @@
     void testTableCellRenderer() throws ReflectiveOperationException {
         Set<Class<? extends TableCellRenderer>> renderers = TestUtils.getJosmSubtypes(TableCellRenderer.class);
-        Assert.assertTrue(renderers.size() >= 10); // if it finds less than 10 classes, something is broken
+        assertTrue(renderers.size() >= 10); // if it finds less than 10 classes, something is broken
         JTable tbl = new JTable(2, 2);
         for (Class<? extends TableCellRenderer> klass : renderers) {
Index: trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java	(revision 18690)
@@ -58,5 +58,5 @@
 
         @Override
-        public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
+        public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException {
             throw new UnsupportedFlavorException(flavor);
         }
@@ -84,5 +84,5 @@
 
         ClipboardUtils.copy(new SupportNothingTransferable());
-        assertEquals(null, ClipboardUtils.getClipboardStringContent());
+        assertNull(ClipboardUtils.getClipboardStringContent());
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/LayerTransferableTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/LayerTransferableTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/LayerTransferableTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -47,5 +48,5 @@
     @Test
     void testLayerData() {
-        Data data = new Data(manager, Arrays.<Layer>asList(layer1, layer2));
+        Data data = new Data(manager, Arrays.asList(layer1, layer2));
 
         // need to be identity
@@ -61,5 +62,5 @@
     @Test
     void testSupportedDataFlavor() {
-        LayerTransferable transferable = new LayerTransferable(manager, Arrays.<Layer>asList(layer1, layer2));
+        LayerTransferable transferable = new LayerTransferable(manager, Arrays.asList(layer1, layer2));
 
         assertFalse(transferable.isDataFlavorSupported(DataFlavor.imageFlavor));
@@ -77,9 +78,8 @@
     @Test
     void testTransferData() throws Exception {
-        LayerTransferable transferable = new LayerTransferable(manager, Arrays.<Layer>asList(layer1, layer2));
+        LayerTransferable transferable = new LayerTransferable(manager, Arrays.asList(layer1, layer2));
 
         Object object = transferable.getTransferData(LayerTransferable.LAYER_DATA);
-        assertTrue(object instanceof Data);
-        Data data = (Data) object;
+        Data data = assertInstanceOf(Data.class, object);
         assertSame(manager, data.getManager());
         assertSame(layer1, data.getLayers().get(0));
@@ -92,5 +92,5 @@
     @Test
     void testTransferDataUnsupported() {
-        LayerTransferable transferable = new LayerTransferable(manager, Arrays.<Layer>asList(layer1, layer2));
+        LayerTransferable transferable = new LayerTransferable(manager, Arrays.asList(layer1, layer2));
 
         assertThrows(UnsupportedFlavorException.class, () -> transferable.getTransferData(DataFlavor.imageFlavor));
Index: trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferableTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferableTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferableTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -67,5 +68,5 @@
         Collection<PrimitiveData> td = ((PrimitiveTransferData) pt.getTransferData(PrimitiveTransferData.DATA_FLAVOR)).getAll();
         assertEquals(1, td.size());
-        assertTrue(td.iterator().next() instanceof NodeData);
+        assertInstanceOf(NodeData.class, td.iterator().next());
 
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTagTransferDataTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTagTransferDataTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTagTransferDataTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 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;
 
@@ -9,4 +10,5 @@
 import java.util.Map;
 
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.NodeData;
@@ -17,6 +19,4 @@
 import org.openstreetmap.josm.data.osm.WayData;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
-
-import org.junit.jupiter.api.Test;
 
 /**
@@ -109,5 +109,5 @@
         assertEquals(2, (int) stats.get(OsmPrimitiveType.NODE));
         assertEquals(1, (int) stats.get(OsmPrimitiveType.WAY));
-        assertEquals(null, stats.get(OsmPrimitiveType.RELATION));
+        assertNull(stats.get(OsmPrimitiveType.RELATION));
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java	(revision 18690)
@@ -3,9 +3,10 @@
 
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
-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.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.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -27,4 +28,5 @@
 import javax.swing.JPopupMenu;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import org.awaitility.Awaitility;
 import org.junit.Rule;
@@ -50,6 +52,4 @@
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * Unit tests of {@link MinimapDialog} class.
@@ -95,5 +95,5 @@
         boolean found = false;
         for (Component c: menu.getComponents()) {
-            if (JPopupMenu.Separator.class.isInstance(c)) {
+            if (c instanceof JPopupMenu.Separator) {
                 break;
             } else {
@@ -102,10 +102,10 @@
                 assertEquals(equalText, isSelected);
                 if (equalText) {
-                    assertFalse("Second selected source found", found);
+                    assertFalse(found, "Second selected source found");
                     found = true;
                 }
             }
         }
-        assertTrue("Selected source not found in menu", found);
+        assertTrue(found, "Selected source not found in menu");
     }
 
@@ -115,5 +115,5 @@
                 JPopupMenu menu = this.sourceButton.getPopupMenu();
                 for (Component c: menu.getComponents()) {
-                    if (JPopupMenu.Separator.class.isInstance(c)) {
+                    if (c instanceof JPopupMenu.Separator) {
                         // sources should all come before any separators
                         break;
@@ -124,5 +124,5 @@
                     // else continue...
                 }
-                fail();
+                fail("Expected JMenuItem with text " + label + " not found");
             });
         } catch (Throwable e) {
@@ -196,8 +196,7 @@
     /**
      * Tests to switch imagery source.
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testSourceSwitching() throws Exception {
+    public void testSourceSwitching() {
         // relevant prefs starting out empty, should choose the first source and have shown download area enabled
         // (not that there's a data layer for it to use)
@@ -243,8 +242,7 @@
     /**
      * Tests that the apparently-selected TileSource survives the tile sources being refreshed.
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testRefreshSourcesRetainsSelection() throws Exception {
+    public void testRefreshSourcesRetainsSelection() {
         // relevant prefs starting out empty, should choose the first source and have shown download area enabled
         // (not that there's a data layer for it to use)
@@ -281,8 +279,7 @@
      * Tests that the currently selected source being removed from ImageryLayerInfo will remain present and
      * selected in the source menu even after the tile sources have been refreshed.
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testRemovedSourceStillSelected() throws Exception {
+    public void testRemovedSourceStillSelected() {
         // relevant prefs starting out empty, should choose the first source and have shown download area enabled
         // (not that there's a data layer for it to use)
@@ -314,8 +311,7 @@
     /**
      * Tests the tile source list includes sources only present in the LayerManager
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testTileSourcesFromCurrentLayers() throws Exception {
+    public void testTileSourcesFromCurrentLayers() {
         // relevant prefs starting out empty, should choose the first (ImageryLayerInfo) source and have shown download area enabled
         // (not that there's a data layer for it to use)
@@ -448,8 +444,7 @@
     /**
      * Tests minimap obeys a saved "mapstyle" preference on startup.
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testSourcePrefObeyed() throws Exception {
+    public void testSourcePrefObeyed() {
         Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
 
@@ -475,8 +470,7 @@
     /**
      * Tests minimap handles an unrecognized "mapstyle" preference on startup
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testSourcePrefInvalid() throws Exception {
+    public void testSourcePrefInvalid() {
         Config.getPref().put("slippy_map_chooser.mapstyle", "Hooloovoo Tiles");
 
@@ -497,8 +491,7 @@
     /**
      * test viewport marker rectangle matches the mapView's aspect ratio
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testViewportAspectRatio() throws Exception {
+    public void testViewportAspectRatio() {
         // Add a test layer to the layer manager to get the MapFrame & MapView
         MainApplication.getLayerManager().addLayer(new TestLayer());
@@ -546,7 +539,7 @@
         // should equal the number on the right
         assertTrue(
-            "Viewport marker not horizontally centered",
-            Math.abs(rowMatcher.group(1).length() - rowMatcher.group(3).length()) < 4
-        );
+                Math.abs(rowMatcher.group(1).length() - rowMatcher.group(3).length()) < 4,
+                "Viewport marker not horizontally centered"
+                );
 
         Matcher colMatcher = ImagePatternMatching.columnMatch(
@@ -561,13 +554,13 @@
         // should equal the number on the bottom
         assertTrue(
-            "Viewport marker not vertically centered",
-            Math.abs(colMatcher.group(1).length() - colMatcher.group(3).length()) < 4
-        );
+                Math.abs(colMatcher.group(1).length() - colMatcher.group(3).length()) < 4,
+                "Viewport marker not vertically centered"
+                );
 
         // (within a tolerance for numerical error) the viewport marker should be square
         assertTrue(
-            "Viewport marker not square",
-            Math.abs(colMatcher.group(2).length() - rowMatcher.group(2).length()) < 4
-        );
+                Math.abs(colMatcher.group(2).length() - rowMatcher.group(2).length()) < 4,
+                "Viewport marker not square"
+                );
 
         // now change the mapView size
@@ -591,7 +584,7 @@
         );
         assertTrue(
-            "Viewport marker not horizontally centered",
-            Math.abs(rowMatcher.group(1).length() - rowMatcher.group(3).length()) < 4
-        );
+                Math.abs(rowMatcher.group(1).length() - rowMatcher.group(3).length()) < 4,
+                "Viewport marker not horizontally centered"
+                );
 
         colMatcher = ImagePatternMatching.columnMatch(
@@ -603,7 +596,7 @@
         );
         assertTrue(
-            "Viewport marker not vertically centered",
-            Math.abs(colMatcher.group(1).length() - colMatcher.group(3).length()) < 4
-        );
+                Math.abs(colMatcher.group(1).length() - colMatcher.group(3).length()) < 4,
+                "Viewport marker not vertically centered"
+                );
 
         try {
@@ -614,7 +607,7 @@
 
         assertTrue(
-            "Viewport marker not 2:1 aspect ratio",
-            Math.abs(colMatcher.group(2).length() - (rowMatcher.group(2).length()*2.0)) < 5
-        );
+                Math.abs(colMatcher.group(2).length() - (rowMatcher.group(2).length()*2.0)) < 5,
+                "Viewport marker not 2:1 aspect ratio"
+                );
     }
 
@@ -623,11 +616,10 @@
         boolean afterSeparator = false;
         for (Component c: menu.getComponents()) {
-            if (JPopupMenu.Separator.class.isInstance(c)) {
-                assertFalse("More than one separator before target item", afterSeparator);
+            if (c instanceof JPopupMenu.Separator) {
+                assertFalse(afterSeparator, "More than one separator before target item");
                 afterSeparator = true;
             } else if (((JMenuItem) c).getText().equals(tr("Show downloaded area"))) {
-                assertTrue("Separator not found before target item", afterSeparator);
-                assertTrue("Target item doesn't appear to be a JCheckBoxMenuItem", JCheckBoxMenuItem.class.isInstance(c));
-                return (JCheckBoxMenuItem) c;
+                assertTrue(afterSeparator, "Separator not found before target item");
+                return assertInstanceOf(JCheckBoxMenuItem.class, c, "Target item doesn't appear to be a JCheckBoxMenuItem");
             }
         }
@@ -638,8 +630,7 @@
     /**
      * test downloaded area is shown shaded
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testShowDownloadedArea() throws Exception {
+    public void testShowDownloadedArea() {
         Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
         Config.getPref().putBoolean("slippy_map_chooser.show_downloaded_area", false);
@@ -797,8 +788,7 @@
     /**
      * test display of downloaded area follows active layer switching
-     * @throws Exception if any error occurs
      */
     @Test
-    public void testShowDownloadedAreaLayerSwitching() throws Exception {
+    public void testShowDownloadedAreaLayerSwitching() {
         Config.getPref().put("slippy_map_chooser.mapstyle", "Green Tiles");
         Config.getPref().putBoolean("slippy_map_chooser.show_downloaded_area", true);
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/CycleLayerActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/CycleLayerActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/CycleLayerActionTest.java	(revision 18690)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.gui.dialogs.layer;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/DuplicateActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/DuplicateActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/DuplicateActionTest.java	(revision 18690)
@@ -3,5 +3,5 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
@@ -37,5 +37,5 @@
                 editLayer = MainApplication.getLayerManager().getEditLayer();
                 assertNotNull(editLayer);
-                assertFalse(layer.equals(editLayer));
+                assertNotEquals(layer, editLayer);
                 assertEquals(layer.data.getNodes().size(), editLayer.data.getNodes().size());
                 assertEquals(layer.data.getWays().size(), editLayer.data.getWays().size());
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorterTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorterTest.java	(revision 18690)
@@ -1,4 +1,7 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs.relation.sort;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.IOException;
@@ -8,5 +11,4 @@
 import java.util.List;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -68,6 +70,6 @@
         final String[] expected = {"t1w4", "t1w3", "t1w2", "t1w1", "t1w7", "t1w6", "t1w5", "t1n1", "t1n2"};
         // expect nodes to be sorted correctly
-        Assert.assertEquals(expected[7], actual[7]);
-        Assert.assertEquals(expected[8], actual[8]);
+        assertEquals(expected[7], actual[7]);
+        assertEquals(expected[8], actual[8]);
     }
 
@@ -75,5 +77,5 @@
     void testAssociatedStreet() {
         String[] actual = getNames(sorter.sortMembers(getRelation("associatedStreet").getMembers()));
-        Assert.assertArrayEquals(new String[] {"t2w1", "t2w2", "t2n1", "t2n2", "t2n3", "t2n4"}, actual);
+        assertArrayEquals(new String[] {"t2w1", "t2w2", "t2n1", "t2n2", "t2n3", "t2n4"}, actual);
     }
 
@@ -81,5 +83,5 @@
     void testStreet() {
         String[] actual = getNames(sorter.sortMembers(getRelation("street").getMembers()));
-        Assert.assertArrayEquals(new String[]{"t2w1", "t2w2", "t2n1", "t2n2", "t2n3", "t2n4", "playground", "tree"}, actual);
+        assertArrayEquals(new String[]{"t2w1", "t2w2", "t2n1", "t2n2", "t2n3", "t2n4", "playground", "tree"}, actual);
     }
 
@@ -94,8 +96,8 @@
         // Check the first way before sorting, otherwise the sorter
         // might pick a different loop starting point than expected below
-        Assert.assertEquals("t5w1", relation.getMembers().get(0).getMember().get("name"));
+        assertEquals("t5w1", relation.getMembers().get(0).getMember().get("name"));
 
         String[] actual = getNames(sorter.sortMembers(relation.getMembers()));
-        Assert.assertArrayEquals(new String[]{
+        assertArrayEquals(new String[]{
             "t5w1", "t5w2a", "t5w3a", "t5w4a", "t5w2b", "t5w3b", "t5w4b",
             "t5w5", "t5w6a", "t5w7a", "t5w8a", "t5w6b", "t5w7b", "t5w8b",
@@ -110,8 +112,8 @@
         // Check the first way before sorting, otherwise the sorter
         // might sort in reverse compared to what is expected below
-        Assert.assertEquals("t5w1", relation.getMembers().get(0).getMember().get("name"));
+        assertEquals("t5w1", relation.getMembers().get(0).getMember().get("name"));
 
         String[] actual = getNames(sorter.sortMembers(relation.getMembers()));
-        Assert.assertArrayEquals(new String[]{
+        assertArrayEquals(new String[]{
             "t5w1", "t5w2a", "t5w3a", "t5w4a", "t5w2b", "t5w3b", "t5w4b",
             "t5w5", "t5w6a", "t5w7a", "t5w8a", "t5w6b", "t5w7b", "t5w8b",
@@ -125,5 +127,5 @@
         Relation relation = getRelation("three-loops-ends-node");
         String[] actual = getNames(sorter.sortMembers(relation.getMembers()));
-        Assert.assertArrayEquals(new String[]{
+        assertArrayEquals(new String[]{
             "t5w4a", "t5w3a", "t5w2a", "t5w2b", "t5w3b", "t5w4b",
             "t5w5", "t5w6a", "t5w7a", "t5w8a", "t5w6b", "t5w7b", "t5w8b",
@@ -136,5 +138,5 @@
         Relation relation = getRelation("one-loop-ends-split");
         String[] actual = getNames(sorter.sortMembers(relation.getMembers()));
-        Assert.assertArrayEquals(new String[]{
+        assertArrayEquals(new String[]{
             "t5w3a", "t5w4a", "t5w3b", "t5w4b",
             "t5w5", "t5w6a", "t5w7a", "t5w8a", "t5w6b", "t5w7b", "t5w8b",
@@ -150,5 +152,5 @@
         // for now.
         String[] actual = getNames(relation.getMembers());
-        Assert.assertArrayEquals(new String[]{
+        assertArrayEquals(new String[]{
             "t5w7a", "t5w8a", "t5w7b", "t5w8b",
             "t5w9a", "t5w10a", "t5w9b", "t5w10b",
@@ -161,5 +163,5 @@
         // TODO: This is not yet sorted perfectly (might not be possible)
         String[] actual = getNames(sorter.sortMembers(relation.getMembers()));
-        Assert.assertArrayEquals(new String[]{
+        assertArrayEquals(new String[]{
             "t5w1", "t5w2a", "t5w3a", "t5w4a", "t5w2b", "t5w3b",
             "t5w5", "t5w6a", "t5w7a", "t5w8a", "t5w9a", "t5w10a", "t5w11a", "t5w6b", "t5w7b",
@@ -173,8 +175,8 @@
         // TODO: This is not always sorted properly, only when the right
         // way is already at the top, so check that
-        Assert.assertEquals("t6w1a", relation.getMembers().get(0).getMember().get("name"));
+        assertEquals("t6w1a", relation.getMembers().get(0).getMember().get("name"));
 
         String[] actual = getNames(sorter.sortMembers(relation.getMembers()));
-        Assert.assertArrayEquals(new String[]{
+        assertArrayEquals(new String[]{
             "t6w1a", "t6w2a", "t6w3a",
             "t6w1b", "t6w2b", "t6w3b",
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculatorTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculatorTest.java	(revision 18690)
@@ -1,4 +1,8 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs.relation.sort;
+
+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;
@@ -12,5 +16,4 @@
 import java.util.List;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -102,5 +105,5 @@
     void testEmpty() {
         String actual = getConnections(wayConnectionTypeCalculator.updateLinks(new ArrayList<>()));
-        Assert.assertEquals("[]", actual);
+        assertEquals("[]", actual);
     }
 
@@ -113,7 +116,7 @@
         Relation relation = getRelation("generic");
         String actual = getConnections(wayConnectionTypeCalculator.updateLinks(relation.getMembers()));
-        Assert.assertEquals("[NONE, NONE, FORWARD, FORWARD, NONE, NONE, NONE, I, I]", actual);
+        assertEquals("[NONE, NONE, FORWARD, FORWARD, NONE, NONE, NONE, I, I]", actual);
         actual = getConnections(wayConnectionTypeCalculator.updateLinks(sorter.sortMembers(relation.getMembers())));
-        Assert.assertEquals("[FORWARD, FORWARD, FORWARD, FORWARD, BACKWARD, BACKWARD, NONE, I, I]", actual);
+        assertEquals("[FORWARD, FORWARD, FORWARD, FORWARD, BACKWARD, BACKWARD, NONE, I, I]", actual);
     }
 
@@ -122,7 +125,7 @@
         Relation relation = getRelation("associatedStreet");
         String actual = getConnections(wayConnectionTypeCalculator.updateLinks(relation.getMembers()));
-        Assert.assertEquals("[NONE, I, I, I, NONE, I]", actual);
+        assertEquals("[NONE, I, I, I, NONE, I]", actual);
         actual = getConnections(wayConnectionTypeCalculator.updateLinks(sorter.sortMembers(relation.getMembers())));
-        Assert.assertEquals("[FORWARD, FORWARD, I, I, I, I]", actual);
+        assertEquals("[FORWARD, FORWARD, I, I, I, I]", actual);
     }
 
@@ -131,8 +134,8 @@
         Relation relation = getRelation("loop");
         String actual = getConnections(wayConnectionTypeCalculator.updateLinks(relation.getMembers()));
-        Assert.assertEquals("[FPH FORWARD, FP FORWARD, NONE, FPH FORWARD, NONE, FPH FORWARD, NONE]", actual);
+        assertEquals("[FPH FORWARD, FP FORWARD, NONE, FPH FORWARD, NONE, FPH FORWARD, NONE]", actual);
         //TODO Sorting doesn't work well in this case
         actual = getConnections(wayConnectionTypeCalculator.updateLinks(sorter.sortMembers(relation.getMembers())));
-        Assert.assertEquals("[BACKWARD, BACKWARD, BACKWARD, FP FORWARD, BP BACKWARD, BP BACKWARD, BPT BACKWARD]", actual);
+        assertEquals("[BACKWARD, BACKWARD, BACKWARD, FP FORWARD, BP BACKWARD, BP BACKWARD, BPT BACKWARD]", actual);
     }
 
@@ -147,5 +150,5 @@
         // Check the first way before sorting, otherwise the sorter
         // might pick a different loop starting point than expected below
-        Assert.assertEquals("t5w1", relation.getMembers().get(0).getMember().get("name"));
+        assertEquals("t5w1", relation.getMembers().get(0).getMember().get("name"));
         String actual = getConnections(wayConnectionTypeCalculator.updateLinks(sorter.sortMembers(relation.getMembers())));
         String expected = "[" +
@@ -155,5 +158,5 @@
             "L FORWARD, L FORWARD" +
         "]";
-        Assert.assertEquals(expected, actual);
+        assertEquals(expected, actual);
     }
 
@@ -163,5 +166,5 @@
         // Check the first way before sorting, otherwise the sorter
         // might sort in reverse compared to what is expected below
-        Assert.assertEquals("t5w1", relation.getMembers().get(0).getMember().get("name"));
+        assertEquals("t5w1", relation.getMembers().get(0).getMember().get("name"));
         String actual = getConnections(wayConnectionTypeCalculator.updateLinks(sorter.sortMembers(relation.getMembers())));
         String expected = "[" +
@@ -171,5 +174,5 @@
             "FORWARD" +
         "]";
-        Assert.assertEquals(expected, actual);
+        assertEquals(expected, actual);
     }
 
@@ -183,5 +186,5 @@
             "FPH FORWARD, FP FORWARD, FP FORWARD, FP FORWARD, FP FORWARD, BPT BACKWARD" +
         "]";
-        Assert.assertEquals(expected, actual);
+        assertEquals(expected, actual);
     }
 
@@ -195,5 +198,5 @@
             "FPH FORWARD, FP FORWARD, BP BACKWARD, BP BACKWARD" +
         "]";
-        Assert.assertEquals(expected, actual);
+        assertEquals(expected, actual);
     }
 
@@ -208,5 +211,5 @@
             "FPH FORWARD, FP FORWARD, BP BACKWARD, BP BACKWARD" +
         "]";
-        Assert.assertEquals(expected, actual);
+        assertEquals(expected, actual);
     }
 
@@ -221,5 +224,5 @@
             "BACKWARD, FPH FORWARD, FP FORWARD, FP FORWARD" +
         "]";
-        Assert.assertEquals(expected, actual);
+        assertEquals(expected, actual);
     }
 
@@ -229,10 +232,10 @@
         // TODO: This is not always sorted properly, only when the right
         // way is already at the top, so check that
-        Assert.assertEquals("t6w1a", relation.getMembers().get(0).getMember().get("name"));
+        assertEquals("t6w1a", relation.getMembers().get(0).getMember().get("name"));
         String actual = getConnections(wayConnectionTypeCalculator.updateLinks(sorter.sortMembers(relation.getMembers())));
         String expected = "[" +
             "FP FORWARD, FP FORWARD, FP FORWARD, BP BACKWARD, BP BACKWARD, BP BACKWARD" +
         "]";
-        Assert.assertEquals(expected, actual);
+        assertEquals(expected, actual);
     }
 
@@ -256,16 +259,16 @@
         List<WayConnectionType> returned = wayConnectionTypeCalculator.updateLinks(relation.getMembers());
         for (int i = 0; i < 4; i++) {
-            Assert.assertTrue(returned.get(i).onewayFollowsPrevious);
-            Assert.assertTrue(returned.get(i).onewayFollowsNext);
-        }
-
-        Assert.assertTrue(returned.get(4).onewayFollowsPrevious);
-        Assert.assertFalse(returned.get(4).onewayFollowsNext);
-
-        Assert.assertFalse(returned.get(5).onewayFollowsPrevious);
-        Assert.assertFalse(returned.get(5).onewayFollowsNext);
-
-        Assert.assertFalse(returned.get(6).onewayFollowsPrevious);
-        Assert.assertTrue(returned.get(6).onewayFollowsNext);
+            assertTrue(returned.get(i).onewayFollowsPrevious);
+            assertTrue(returned.get(i).onewayFollowsNext);
+        }
+
+        assertTrue(returned.get(4).onewayFollowsPrevious);
+        assertFalse(returned.get(4).onewayFollowsNext);
+
+        assertFalse(returned.get(5).onewayFollowsPrevious);
+        assertFalse(returned.get(5).onewayFollowsNext);
+
+        assertFalse(returned.get(6).onewayFollowsPrevious);
+        assertTrue(returned.get(6).onewayFollowsNext);
 
         // Reverse the last oneway
@@ -276,16 +279,16 @@
             returned = wayConnectionTypeCalculator.updateLinks(relation.getMembers());
             for (int i = 0; i < 4; i++) {
-                Assert.assertTrue(returned.get(i).onewayFollowsPrevious);
-                Assert.assertTrue(returned.get(i).onewayFollowsNext);
+                assertTrue(returned.get(i).onewayFollowsPrevious);
+                assertTrue(returned.get(i).onewayFollowsNext);
             }
 
-            Assert.assertTrue(returned.get(4).onewayFollowsPrevious);
-            Assert.assertFalse(returned.get(4).onewayFollowsNext);
-
-            Assert.assertFalse(returned.get(5).onewayFollowsPrevious);
-            Assert.assertTrue(returned.get(5).onewayFollowsNext);
-
-            Assert.assertTrue(returned.get(6).onewayFollowsPrevious);
-            Assert.assertTrue(returned.get(6).onewayFollowsNext);
+            assertTrue(returned.get(4).onewayFollowsPrevious);
+            assertFalse(returned.get(4).onewayFollowsNext);
+
+            assertFalse(returned.get(5).onewayFollowsPrevious);
+            assertTrue(returned.get(5).onewayFollowsNext);
+
+            assertTrue(returned.get(6).onewayFollowsPrevious);
+            assertTrue(returned.get(6).onewayFollowsNext);
             reverseWay(way);
         }
@@ -298,6 +301,6 @@
             returned = wayConnectionTypeCalculator.updateLinks(relation.getMembers());
             for (int i = 0; i < 7; i++) {
-                Assert.assertTrue(returned.get(i).onewayFollowsPrevious);
-                Assert.assertTrue(returned.get(i).onewayFollowsNext);
+                assertTrue(returned.get(i).onewayFollowsPrevious);
+                assertTrue(returned.get(i).onewayFollowsNext);
             }
         }
@@ -309,6 +312,6 @@
         returned = wayConnectionTypeCalculator.updateLinks(relation.getMembers());
         for (int i = 0; i < 7; i++) {
-            Assert.assertTrue(returned.get(i).onewayFollowsPrevious);
-            Assert.assertTrue(returned.get(i).onewayFollowsNext);
+            assertTrue(returned.get(i).onewayFollowsPrevious);
+            assertTrue(returned.get(i).onewayFollowsNext);
         }
     }
@@ -326,6 +329,6 @@
         List<WayConnectionType> returned = wayConnectionTypeCalculator.updateLinks(relation.getMembers());
         for (WayConnectionType type : returned) {
-            Assert.assertTrue(type.onewayFollowsNext);
-            Assert.assertTrue(type.onewayFollowsPrevious);
+            assertTrue(type.onewayFollowsNext);
+            assertTrue(type.onewayFollowsPrevious);
         }
 
@@ -334,6 +337,6 @@
         returned = wayConnectionTypeCalculator.updateLinks(relation.getMembers());
         for (WayConnectionType type : returned) {
-            Assert.assertTrue(type.onewayFollowsNext);
-            Assert.assertTrue(type.onewayFollowsPrevious);
+            assertTrue(type.onewayFollowsNext);
+            assertTrue(type.onewayFollowsPrevious);
         }
 
@@ -346,9 +349,9 @@
         for (int i = 0; i < returned.size() - 1; i++) {
             WayConnectionType type = returned.get(i);
-            Assert.assertTrue(type.onewayFollowsNext);
-            Assert.assertTrue(type.onewayFollowsPrevious);
-        }
-        Assert.assertTrue(returned.get(6).onewayFollowsNext);
-        Assert.assertFalse(returned.get(6).onewayFollowsPrevious);
+            assertTrue(type.onewayFollowsNext);
+            assertTrue(type.onewayFollowsPrevious);
+        }
+        assertTrue(returned.get(6).onewayFollowsNext);
+        assertFalse(returned.get(6).onewayFollowsPrevious);
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanelTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanelTest.java	(revision 18690)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.gui.dialogs.validator;
 
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -31,5 +32,5 @@
     @Test
     void testValidatorTreePanel() {
-        assertNotNull(new ValidatorTreePanel());
+        assertDoesNotThrow(() -> new ValidatorTreePanel());
 
         ValidatorTreePanel vtp = new ValidatorTreePanel(new ArrayList<>(Arrays.asList(
@@ -59,17 +60,17 @@
         vtp.setVisible(false);
         Node n = new Node(10);
-        vtp.setErrors(Arrays.asList(TestError.builder(null, Severity.ERROR, 0)
+        vtp.setErrors(Collections.singletonList(TestError.builder(null, Severity.ERROR, 0)
                 .message("")
                 .primitives(n)
                 .build()));
         assertEquals(1, vtp.getErrors().size());
-        vtp.selectRelatedErrors(Collections.<OsmPrimitive>singleton(n));
+        vtp.selectRelatedErrors(Collections.singleton(n));
         vtp.expandAll();
         assertNotNull(vtp.getRoot());
         vtp.resetErrors();
-        Set<? extends OsmPrimitive> filter = new HashSet<>(Arrays.asList(n));
+        Set<? extends OsmPrimitive> filter = new HashSet<>(Collections.singletonList(n));
         vtp.setFilter(filter);
         assertEquals(filter, vtp.getFilter());
-        vtp.setFilter(new HashSet<OsmPrimitive>());
+        vtp.setFilter(new HashSet<>());
         assertNull(vtp.getFilter());
         vtp.setFilter(null);
Index: trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java	(revision 18690)
@@ -53,5 +53,5 @@
 
     /**
-     * Unit test of {@link HistoryLoadTask#loadHistory}
+     * Unit test of {@link HistoryLoadTask#loadHistory(OsmServerHistoryReader, ProgressMonitor)}
      * @throws OsmTransferException if an error occurs
      */
Index: trunk/test/unit/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTaskTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTaskTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/AsynchronousUploadPrimitivesTaskTest.java	(revision 18690)
@@ -1,4 +1,7 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.io;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import java.util.Collections;
@@ -7,5 +10,4 @@
 import javax.swing.JOptionPane;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
@@ -94,6 +96,6 @@
         Optional<AsynchronousUploadPrimitivesTask> task = AsynchronousUploadPrimitivesTask.
                 createAsynchronousUploadTask(strategy, layer, toUpload, changeset);
-        Assert.assertNotNull(uploadPrimitivesTask);
-        Assert.assertFalse(task.isPresent());
+        assertNotNull(uploadPrimitivesTask);
+        assertFalse(task.isPresent());
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java	(revision 18690)
@@ -5,4 +5,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -88,8 +89,7 @@
     /**
      * Unit test of {@link GpxLayer#GpxLayer}.
-     * @throws Exception if any error occurs
-     */
-    @Test
-    void testGpxLayer() throws Exception {
+     */
+    @Test
+    void testGpxLayer() {
         GpxLayer layer = new GpxLayer(new GpxData(), "foo", false);
         GpxTrack trk = new GpxTrack(new ArrayList<IGpxTrackSegment>(), new HashMap<>());
@@ -211,5 +211,5 @@
     void testGetTimespanForTrack() throws Exception {
         assertEquals("", GpxLayer.getTimespanForTrack(
-                new GpxTrack(new ArrayList<Collection<WayPoint>>(), new HashMap<String, Object>())));
+                new GpxTrack(new ArrayList<Collection<WayPoint>>(), new HashMap<>())));
 
         assertEquals("2016-01-03 11:59:58 \u2013 12:00:00 (2.0 s)", GpxLayer.getTimespanForTrack(getMinimalGpxData().tracks.iterator().next()));
@@ -238,5 +238,7 @@
     @Test
     void testMergeFromIAE() {
-        assertThrows(IllegalArgumentException.class, () -> new GpxLayer(new GpxData()).mergeFrom(new OsmDataLayer(new DataSet(), "", null)));
+        final GpxLayer gpxLayer = new GpxLayer(new GpxData());
+        final OsmDataLayer osmDataLayer = new OsmDataLayer(new DataSet(), "testMergeFromIAE", null);
+        assertThrows(IllegalArgumentException.class, () -> gpxLayer.mergeFrom(osmDataLayer));
     }
 
@@ -297,13 +299,11 @@
         assertNull(layer.getAssociatedFile());
         Object infoComponent = layer.getInfoComponent();
-        assertTrue(infoComponent instanceof JScrollPane);
-        Component view = ((JScrollPane) infoComponent).getViewport().getView();
-        assertTrue(view instanceof HtmlPanel);
-        String text = ((HtmlPanel) view).getEditorPane().getText().trim();
+        Component view = assertInstanceOf(JScrollPane.class, infoComponent).getViewport().getView();
+        String text = assertInstanceOf(HtmlPanel.class, view).getEditorPane().getText().trim();
         assertTrue(text.startsWith("<html>"), text);
         assertTrue(text.endsWith("</html>"), text);
         assertEquals("<html><br></html>", layer.getToolTipText());
-        assertDoesNotThrow(() -> layer.jumpToNextMarker());
-        assertDoesNotThrow(() -> layer.jumpToPreviousMarker());
+        assertDoesNotThrow(layer::jumpToNextMarker);
+        assertDoesNotThrow(layer::jumpToPreviousMarker);
         assertDoesNotThrow(() -> layer.visitBoundingBox(new BoundingXYVisitor()));
         assertDoesNotThrow(() -> layer.filterTracksByDate(null, null, false));
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerActionTest.java	(revision 18690)
@@ -9,4 +9,5 @@
 import java.nio.file.Paths;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
@@ -73,10 +74,10 @@
 
         Config.getPref().put("gpx.convert-tags", "list");
-        Config.getPref().putList("gpx.convert-tags.list.yes", Arrays.asList("ele"));
-        Config.getPref().putList("gpx.convert-tags.list.no", Arrays.asList("time"));
+        Config.getPref().putList("gpx.convert-tags.list.yes", Collections.singletonList("ele"));
+        Config.getPref().putList("gpx.convert-tags.list.no", Collections.singletonList("time"));
         testFromTrack("tracks.gpx", "tracks-ele.osm");
 
-        Config.getPref().putList("gpx.convert-tags.list.yes", Arrays.asList("time"));
-        Config.getPref().putList("gpx.convert-tags.list.no", Arrays.asList("ele"));
+        Config.getPref().putList("gpx.convert-tags.list.yes", Collections.singletonList("time"));
+        Config.getPref().putList("gpx.convert-tags.list.no", Collections.singletonList("ele"));
         testFromTrack("tracks.gpx", "tracks-time.osm");
 
@@ -141,12 +142,12 @@
 
         List<String> ways = osm.getWays().stream()
-                .map(w -> Integer.toString(w.getNodes().size()) + ":" + w.getKeys().entrySet().stream()
-                        .sorted(Comparator.comparing(Map.Entry::getKey)).collect(Collectors.toList()).toString())
+                .map(w -> w.getNodes().size() + ":" + w.getKeys().entrySet().stream()
+                        .sorted(Map.Entry.comparingByKey()).collect(Collectors.toList()))
                 .sorted()
                 .collect(Collectors.toList());
 
         List<String> waysExpected = osmExpected.getWays().stream()
-                .map(w -> Integer.toString(w.getNodes().size()) + ":" + w.getKeys().entrySet().stream()
-                        .sorted(Comparator.comparing(Map.Entry::getKey)).collect(Collectors.toList()).toString())
+                .map(w -> w.getNodes().size() + ":" + w.getKeys().entrySet().stream()
+                        .sorted(Map.Entry.comparingByKey()).collect(Collectors.toList()))
                 .sorted()
                 .collect(Collectors.toList());
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java	(revision 18690)
@@ -3,8 +3,8 @@
 
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Collections;
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/AllMappaintTests.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/AllMappaintTests.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/AllMappaintTests.java	(revision 18690)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.gui.mappaint;
 
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
+import org.junit.platform.suite.api.SelectClasses;
+import org.junit.platform.suite.api.Suite;
 import org.openstreetmap.josm.gui.mappaint.mapcss.AllMapCSSTests;
 
@@ -9,6 +9,6 @@
  * All mappaint tests.
  */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
+@Suite
+@SelectClasses({
     LabelCompositionStrategyTest.class,
     MapCSSWithExtendedTextDirectivesTest.class,
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSWithExtendedTextDirectivesTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSWithExtendedTextDirectivesTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSWithExtendedTextDirectivesTest.java	(revision 18690)
@@ -3,7 +3,7 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.awt.Color;
@@ -46,5 +46,5 @@
         TextLabel te = TextLabel.create(env, Color.WHITE, false /* no default annotate */);
         assertNotNull(te.labelCompositionStrategy);
-        assertTrue(te.labelCompositionStrategy instanceof DeriveLabelFromNameTagsCompositionStrategy);
+        assertInstanceOf(DeriveLabelFromNameTagsCompositionStrategy.class, te.labelCompositionStrategy);
     }
 
@@ -63,5 +63,5 @@
         TextLabel te = TextLabel.create(env, Color.WHITE, false /* no default annotate */);
         assertNotNull(te.labelCompositionStrategy);
-        assertTrue(te.labelCompositionStrategy instanceof TagLookupCompositionStrategy);
+        assertInstanceOf(TagLookupCompositionStrategy.class, te.labelCompositionStrategy);
         assertEquals("my_name", ((TagLookupCompositionStrategy) te.labelCompositionStrategy).getDefaultLabelTag());
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/AllMapCSSTests.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/AllMapCSSTests.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/AllMapCSSTests.java	(revision 18690)
@@ -2,12 +2,12 @@
 package org.openstreetmap.josm.gui.mappaint.mapcss;
 
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
+import org.junit.platform.suite.api.SelectClasses;
+import org.junit.platform.suite.api.Suite;
 
 /**
  * All MapCSS tests.
  */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
+@Suite
+@SelectClasses({
     KeyValueConditionTest.class,
     ParsingLinkSelectorTest.class,
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -54,8 +55,8 @@
         assertFalse(op.applies(genEnv(node4)));
 
-        assertTrue(op instanceof SimpleKeyValueCondition);
+        TagCondition tc = assertInstanceOf(SimpleKeyValueCondition.class, op);
         assertEquals("[k1=v1]", op.toString());
-        assertEquals("k1", ((TagCondition) op).asTag(null).getKey());
-        assertEquals("v1", ((TagCondition) op).asTag(null).getValue());
+        assertEquals("k1", tc.asTag(null).getKey());
+        assertEquals("v1", tc.asTag(null).getValue());
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
@@ -16,5 +17,4 @@
 import java.util.regex.Pattern;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -80,8 +80,8 @@
     void testClassCondition() throws Exception {
         List<Condition> conditions = getParser("way[name=X].highway:closed").selector().getConditions();
-        assertTrue(conditions.get(0) instanceof SimpleKeyValueCondition);
+        assertInstanceOf(SimpleKeyValueCondition.class, conditions.get(0));
         assertTrue(conditions.get(0).applies(getEnvironment("name", "X")));
-        assertTrue(conditions.get(1) instanceof ClassCondition);
-        assertTrue(conditions.get(2) instanceof PseudoClassCondition);
+        assertInstanceOf(ClassCondition.class, conditions.get(1));
+        assertInstanceOf(PseudoClassCondition.class, conditions.get(2));
         assertFalse(conditions.get(2).applies(getEnvironment("name", "X")));
     }
@@ -106,5 +106,5 @@
 
     @Test
-    void testClassMatching() throws Exception {
+    void testClassMatching() {
         MapCSSStyleSource css = new MapCSSStyleSource(
                 "way[highway=footway] { set .path; color: #FF6644; width: 2; }\n" +
@@ -147,7 +147,7 @@
     void testEqualCondition() throws Exception {
         Condition condition = getParser("[surface=paved]").condition(PRIMITIVE);
-        assertTrue(condition instanceof SimpleKeyValueCondition);
-        assertEquals("surface", ((SimpleKeyValueCondition) condition).k);
-        assertEquals("paved", ((SimpleKeyValueCondition) condition).v);
+        SimpleKeyValueCondition simpleKeyValueCondition = assertInstanceOf(SimpleKeyValueCondition.class, condition);
+        assertEquals("surface", simpleKeyValueCondition.k);
+        assertEquals("paved", simpleKeyValueCondition.v);
         assertTrue(condition.applies(getEnvironment("surface", "paved")));
         assertFalse(condition.applies(getEnvironment("surface", "unpaved")));
@@ -315,14 +315,14 @@
     private void tagRegex(Way way, String parserString, Boolean[] expected) throws Exception {
         Selector selector = getParser(parserString).selector();
-        Assert.assertEquals(expected[0], selector.matches(new Environment(way)));
+        assertEquals(expected[0], selector.matches(new Environment(way)));
         way.put("old_ref", null);
-        Assert.assertEquals(expected[1], selector.matches(new Environment(way)));
+        assertEquals(expected[1], selector.matches(new Environment(way)));
         way.put("no_match_tag", "false");
-        Assert.assertEquals(expected[2], selector.matches(new Environment(way)));
+        assertEquals(expected[2], selector.matches(new Environment(way)));
         way.put("old_ref", "A22");
-        Assert.assertEquals(expected[3], selector.matches(new Environment(way)));
+        assertEquals(expected[3], selector.matches(new Environment(way)));
         way.put("old_ref", null);
         way.put("OLD_REF", "A23");
-        Assert.assertEquals(expected[4], selector.matches(new Environment(way)));
+        assertEquals(expected[4], selector.matches(new Environment(way)));
     }
 
@@ -368,5 +368,5 @@
 
     @Test
-    void testTicket8568() throws Exception {
+    void testTicket8568() {
         MapCSSStyleSource sheet = new MapCSSStyleSource(
                 "way { width: 5; }\n" +
@@ -385,5 +385,5 @@
 
     @Test
-    void testTicket8071() throws Exception {
+    void testTicket8071() {
         MapCSSStyleSource sheet = new MapCSSStyleSource(
                 "*[rcn_ref], *[name] {text: concat(tag(rcn_ref), \" \", tag(name)); }");
@@ -421,5 +421,5 @@
 
     @Test
-    void testColorParsing() throws Exception {
+    void testColorParsing() {
         assertEquals(new Color(0x12, 0x34, 0x56, 0x78), ColorHelper.html2color("#12345678"));
     }
@@ -459,5 +459,5 @@
 
     @Test
-    void testParentTags() throws Exception {
+    void testParentTags() {
         DataSet ds = new DataSet();
         Node n = new Node(new LatLon(1, 2));
@@ -486,6 +486,6 @@
 
     @Test
-    void testSort() throws Exception {
-        assertEquals(Arrays.asList(new String[] {"alpha", "beta"}), Functions.sort(null, "beta", "alpha"));
+    void testSort() {
+        assertEquals(Arrays.asList("alpha", "beta"), Functions.sort(null, "beta", "alpha"));
         Way way1 = TestUtils.newWay("highway=residential name=Alpha alt_name=Beta ref=\"A9;A8\"", new Node(new LatLon(0.001, 0.001)),
                 new Node(new LatLon(0.002, 0.002)));
@@ -508,13 +508,13 @@
 
     @Test
-    void testUniqueValues() throws Exception {
-        assertEquals(Arrays.asList(new String[] {"alpha", "beta"}),
+    void testUniqueValues() {
+        assertEquals(Arrays.asList("alpha", "beta"),
                 Functions.uniq(null, "alpha", "alpha", "alpha", "beta"));
-        assertEquals(Arrays.asList(new String[] {"one", "two", "three"}),
-                Functions.uniq_list(Arrays.asList(new String[] {"one", "one", "two", "two", "two", "three"})));
-    }
-
-    @Test
-    void testCountRoles() throws Exception {
+        assertEquals(Arrays.asList("one", "two", "three"),
+                Functions.uniq_list(Arrays.asList("one", "one", "two", "two", "two", "three")));
+    }
+
+    @Test
+    void testCountRoles() {
         DataSet ds = new DataSet();
         Way way1 = TestUtils.newWay("highway=residential name=1",
@@ -596,5 +596,5 @@
 
     @Test
-    void testInvalidBaseSelector() throws Exception {
+    void testInvalidBaseSelector() {
         MapCSSStyleSource css = new MapCSSStyleSource("invalid_base[key=value] {}");
         css.loadStyleSource();
@@ -624,5 +624,5 @@
         assertEquals(24.0, mc.getCascade(null).get("div"));
         assertEquals(-13.0, mc.getCascade(null).get("neg"));
-        assertEquals(true, mc.getCascade(null).get("not"));
+        assertEquals(Boolean.TRUE, mc.getCascade(null).get("not"));
         assertNull(mc.getCascade(null).get("null0"));
         assertNull(mc.getCascade(null).get("null1"));
@@ -631,5 +631,5 @@
 
     @Test
-    void testMinMaxFunctions() throws Exception {
+    void testMinMaxFunctions() {
         MapCSSStyleSource sheet = new MapCSSStyleSource("* {" +
                 "min_value: min(tag(x), tag(y), tag(z)); " +
@@ -700,5 +700,6 @@
     @Test
     void testZoomIAE() {
-        assertThrows(IllegalArgumentException.class, () -> getParser("|z16-15").zoom());
+        final MapCSSParser parser = getParser("|z16-15");
+        assertThrows(IllegalArgumentException.class, parser::zoom);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/AbstractExtendedSourceEntryTestCase.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/AbstractExtendedSourceEntryTestCase.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/AbstractExtendedSourceEntryTestCase.java	(revision 18690)
@@ -23,5 +23,5 @@
     protected static final List<String> errorsToIgnore = new ArrayList<>();
 
-    protected static List<Object[]> getTestParameters(Collection<ExtendedSourceEntry> entries) throws Exception {
+    protected static List<Object[]> getTestParameters(Collection<ExtendedSourceEntry> entries) {
         return entries.stream().map(x -> new Object[] {x.getDisplayName(), cleanUrl(x.url), x}).collect(Collectors.toList());
     }
@@ -45,5 +45,5 @@
     protected final void handleException(ExtendedSourceEntry source, Throwable e, Set<String> errors, List<String> ignoredErrors) {
         e.printStackTrace();
-        String s = source.url + " => " + e.toString();
+        String s = source.url + " => " + e;
         if (isIgnoredSubstring(source, s)) {
             ignoredErrors.add(s);
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java	(revision 18690)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.preferences;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.awt.event.ActionEvent;
@@ -11,5 +13,4 @@
 import javax.swing.Action;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.actions.ActionParameter;
@@ -54,5 +55,5 @@
             expected.put((String) params[i], params[i+1]);
         }
-        Assert.assertEquals(expected, a.getParameters());
+        assertEquals(expected, a.getParameters());
     }
 
@@ -73,10 +74,10 @@
         checkAction(parser.loadAction("action(uknownParam=aa)"));
 
-        Assert.assertEquals("action(param1=value1,param2=value2)",
-                parser.saveAction(parser.loadAction("action(param1=value1,param2=value2)")));
-        Assert.assertEquals("action(param1=value1,param2=)",
-                parser.saveAction(parser.loadAction("action(param1=value1)")));
-        Assert.assertEquals("action(param1=value1,param2=2\\(\\=\\,\\\\)",
-                parser.saveAction(parser.loadAction("action(param1=value1,param2=2\\(\\=\\,\\\\)")));
+        assertEquals("action(param1=value1,param2=value2)", parser.saveAction(parser.loadAction("action(param1=value1,param2=value2)")));
+        assertEquals("action(param1=value1,param2=)", parser.saveAction(parser.loadAction("action(param1=value1)")));
+        assertEquals(
+                "action(param1=value1,param2=2\\(\\=\\,\\\\)",
+                parser.saveAction(parser.loadAction("action(param1=value1,param2=2\\(\\=\\,\\\\)"))
+        );
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 18690)
@@ -146,5 +146,5 @@
 
     private static boolean isIgnoredSubstring(String substring) {
-        return errorsToIgnore.parallelStream().anyMatch(x -> substring.contains(x));
+        return errorsToIgnore.parallelStream().anyMatch(substring::contains);
     }
 
@@ -342,5 +342,5 @@
             }
         } catch (IOException | RuntimeException | WMSGetCapabilitiesException e) {
-            addError(info, info.getUrl() + ERROR_SEP + e.toString());
+            addError(info, info.getUrl() + ERROR_SEP + e);
         }
 
@@ -394,5 +394,5 @@
                 return new WMTSTileSource(info, proj);
             } catch (IOException | WMTSGetCapabilitiesException e) {
-                addError(info, info.getUrl() + ERROR_SEP + e.toString());
+                addError(info, info.getUrl() + ERROR_SEP + e);
                 return null;
             }
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java	(revision 18690)
@@ -4,7 +4,7 @@
 import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
-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.awt.Component;
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java	(revision 18690)
@@ -5,4 +5,5 @@
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
@@ -13,5 +14,4 @@
 import java.util.stream.Collectors;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -45,9 +45,9 @@
         String presetfile = TestUtils.getRegressionDataFile(8954, "preset.xml");
         final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(presetfile, false);
-        Assert.assertEquals("Number of preset items", 1, presets.size());
+        assertEquals(1, presets.size(), "Number of preset items");
         final TaggingPreset preset = presets.iterator().next();
-        Assert.assertEquals("Number of entries", 1, preset.data.size());
+        assertEquals(1, preset.data.size(), "Number of entries");
         final TaggingPresetItem item = preset.data.get(0);
-        Assert.assertTrue("Entry is not checkbox", item instanceof Check);
+        assertInstanceOf(Check.class, item, "Entry is not checkbox");
     }
 
@@ -93,5 +93,5 @@
         String presetfile = "resource://data/defaultpresets.xml";
         final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(presetfile, true);
-        Assert.assertTrue("Default presets are empty", presets.size() > 0);
+        assertTrue(presets.size() > 0, "Default presets are empty");
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetsTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetsTest.java	(revision 18690)
@@ -3,6 +3,6 @@
 
 import static org.junit.jupiter.api.Assertions.assertAll;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertSame;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Collection;
@@ -62,6 +62,6 @@
         assertAll(() -> assertSame(menu.presetSearchAction, presetsMenu.getItem(0).getAction()),
                 () -> assertSame(menu.presetSearchPrimitiveAction, presetsMenu.getItem(1).getAction()),
-                () -> assertTrue(presetsMenu.getItem(2).getAction() instanceof PreferencesAction),
-                () -> assertTrue(presetsMenu.getMenuComponent(3) instanceof JSeparator));
+                () -> assertInstanceOf(PreferencesAction.class, presetsMenu.getItem(2).getAction()),
+                () -> assertInstanceOf(JSeparator.class, presetsMenu.getMenuComponent(3)));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/widgets/HistoryComboBoxTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/widgets/HistoryComboBoxTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/gui/widgets/HistoryComboBoxTest.java	(revision 18690)
@@ -21,5 +21,5 @@
 class HistoryComboBoxTest {
     static Stream<Arguments> testNonRegression21203() {
-        return Stream.of(Arguments.of("Hello world"), Arguments.of(new AutoCompletionItem("Hello world2")), Arguments.of(new Double(42)));
+        return Stream.of(Arguments.of("Hello world"), Arguments.of(new AutoCompletionItem("Hello world2")), Arguments.of(42.0));
     }
 
@@ -59,5 +59,5 @@
         historyComboBox.addCurrentItemToHistory();
 
-        // add a new item
+        // Add a new item
         historyComboBox.getEditor().setItem(new AutoCompletionItem("testNonRegression21215_2"));
         historyComboBox.addCurrentItemToHistory();
Index: trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java	(revision 18690)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.io;
 
+import static org.junit.jupiter.api.Assertions.fail;
 import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
@@ -12,5 +13,4 @@
 import javax.net.ssl.SSLHandshakeException;
 
-import org.junit.Assert;
 import org.junit.ClassRule;
 import org.junit.jupiter.api.BeforeAll;
@@ -111,5 +111,5 @@
         assumeFalse(errorsToIgnore.contains(error));
         if (!shouldWork) {
-            Assert.fail(error);
+            fail(error);
         }
     }
Index: trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -221,6 +222,5 @@
             assertEquals(1, primitives.size());
             OsmPrimitive primitive = primitives.get(0);
-            assertTrue(primitive instanceof Node);
-            Node n = (Node) primitive;
+            Node n = assertInstanceOf(Node.class, primitive);
             assertNull(n.get("addr:building"));
             assertEquals("06883", n.get("addr:postcode"));
Index: trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.java	(revision 18690)
@@ -4,6 +4,6 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.ByteArrayInputStream;
@@ -12,4 +12,6 @@
 import java.util.Arrays;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.ChangesetDataSet;
 import org.openstreetmap.josm.data.osm.ChangesetDataSet.ChangesetModificationType;
@@ -21,9 +23,5 @@
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
-import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.XmlParsingException;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import org.junit.jupiter.api.Test;
 
 /**
@@ -32,13 +30,4 @@
 @BasicPreferences
 class OsmChangesetContentParserTest {
-    private static void shouldFail(Runnable r) {
-        try {
-            r.run();
-            fail("should throw exception");
-        } catch (IllegalArgumentException e) {
-            Logging.trace(e);
-        }
-    }
-
     /**
      * Test various constructor invocations
@@ -51,11 +40,7 @@
         new OsmChangesetContentParser(new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8)));
 
-        shouldFail(() -> {
-            new OsmChangesetContentParser((String) null);
-        });
-
-        shouldFail(() -> {
-            new OsmChangesetContentParser((InputStream) null);
-        });
+        assertThrows(IllegalArgumentException.class, () -> new OsmChangesetContentParser((String) null));
+
+        assertThrows(IllegalArgumentException.class, () -> new OsmChangesetContentParser((InputStream) null));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java	(revision 18690)
@@ -14,5 +14,4 @@
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 
@@ -48,5 +47,5 @@
         }
 
-        Collections.sort(ids, OsmWriter.byIdComparator);
+        ids.sort(OsmWriter.byIdComparator);
 
         final long[] longIds = ids.stream().mapToLong(NodeData::getUniqueId).toArray();
Index: trunk/test/unit/org/openstreetmap/josm/io/UrlPatternsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/UrlPatternsTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/io/UrlPatternsTest.java	(revision 18690)
@@ -37,5 +37,5 @@
     void testUrlPatterns() {
         assertTrue(patterns.stream().flatMap(c -> Arrays.stream(c.getEnumConstants())).map(t -> ((UrlPattern) t).pattern())
-                .map(Pattern::compile).count() > 0);
+                .map(Pattern::compile).findAny().isPresent());
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java	(revision 18690)
@@ -4,4 +4,5 @@
 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;
 
@@ -70,6 +71,6 @@
         assertEquals("3d", wayPoints.get(0).get(GpxConstants.PT_FIX));
         assertEquals("0.7", wayPoints.get(0).get(GpxConstants.PT_HDOP).toString().trim());
-        assertEquals(null, wayPoints.get(0).get(GpxConstants.PT_VDOP));
-        assertEquals(null, wayPoints.get(0).get(GpxConstants.PT_PDOP));
+        assertNull(wayPoints.get(0).get(GpxConstants.PT_VDOP));
+        assertNull(wayPoints.get(0).get(GpxConstants.PT_PDOP));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java	(revision 18690)
@@ -3,4 +3,5 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -76,6 +77,5 @@
             List<Layer> layers = testRead(file);
             assertEquals(layers.size(), 1);
-            assertTrue(layers.get(0) instanceof OsmDataLayer);
-            OsmDataLayer osm = (OsmDataLayer) layers.get(0);
+            OsmDataLayer osm = assertInstanceOf(OsmDataLayer.class, layers.get(0));
             assertEquals(osm.getName(), "OSM layer name");
         }
@@ -92,6 +92,5 @@
             List<Layer> layers = testRead(file);
             assertEquals(layers.size(), 1);
-            assertTrue(layers.get(0) instanceof GpxLayer);
-            GpxLayer gpx = (GpxLayer) layers.get(0);
+            GpxLayer gpx = assertInstanceOf(GpxLayer.class, layers.get(0));
             assertEquals(gpx.getName(), "GPX layer name");
         }
@@ -135,5 +134,5 @@
         final List<Layer> layers = testRead("bing.jos");
         assertEquals(layers.size(), 1);
-        assertTrue(layers.get(0) instanceof ImageryLayer);
+        assertInstanceOf(ImageryLayer.class, layers.get(0));
         final AbstractTileSourceLayer<?> image = (AbstractTileSourceLayer<?>) layers.get(0);
         assertEquals("Bing aerial imagery", image.getName());
@@ -157,6 +156,5 @@
         final List<Layer> layers = testRead("notes.joz");
         assertEquals(layers.size(), 1);
-        assertTrue(layers.get(0) instanceof NoteLayer);
-        final NoteLayer layer = (NoteLayer) layers.get(0);
+        final NoteLayer layer = assertInstanceOf(NoteLayer.class, layers.get(0));
         assertEquals("Notes", layer.getName());
         assertEquals(174, layer.getNoteData().getNotes().size());
Index: trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java	(revision 18690)
@@ -131,5 +131,5 @@
             }
         }
-        SessionWriter sw = new SessionWriter(layers, -1, exporters, new MultiMap<Layer, Layer>(), zip);
+        SessionWriter sw = new SessionWriter(layers, -1, exporters, new MultiMap<>(), zip);
         File file = new File(System.getProperty("java.io.tmpdir"), getClass().getName()+(zip ? ".joz" : ".jos"));
         try {
@@ -214,5 +214,5 @@
      */
     public static NoteLayer createNoteLayer() {
-        return new NoteLayer(Arrays.asList(new Note(LatLon.ZERO)), "layer name");
+        return new NoteLayer(Collections.singletonList(new Note(LatLon.ZERO)), "layer name");
     }
 
@@ -223,5 +223,5 @@
     @Test
     void testWriteEmptyJos() throws IOException {
-        testWrite(Collections.<Layer>emptyList(), false);
+        testWrite(Collections.emptyList(), false);
     }
 
@@ -232,5 +232,5 @@
     @Test
     void testWriteEmptyJoz() throws IOException {
-        testWrite(Collections.<Layer>emptyList(), true);
+        testWrite(Collections.emptyList(), true);
     }
 
@@ -241,5 +241,5 @@
     @Test
     void testWriteOsmJos() throws IOException {
-        testWrite(Collections.<Layer>singletonList(createOsmLayer()), false);
+        testWrite(Collections.singletonList(createOsmLayer()), false);
     }
 
@@ -250,5 +250,5 @@
     @Test
     void testWriteOsmJoz() throws IOException {
-        testWrite(Collections.<Layer>singletonList(createOsmLayer()), true);
+        testWrite(Collections.singletonList(createOsmLayer()), true);
     }
 
@@ -259,5 +259,5 @@
     @Test
     void testWriteGpxJos() throws IOException {
-        testWrite(Collections.<Layer>singletonList(createGpxLayer()), false);
+        testWrite(Collections.singletonList(createGpxLayer()), false);
     }
 
@@ -268,5 +268,5 @@
     @Test
     void testWriteGpxJoz() throws IOException {
-        testWrite(Collections.<Layer>singletonList(createGpxLayer()), true);
+        testWrite(Collections.singletonList(createGpxLayer()), true);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerJOSMTooOldTest.java	(revision 18690)
@@ -3,7 +3,7 @@
 
 import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
 import java.io.File;
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerMultiVersionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerMultiVersionTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerMultiVersionTest.java	(revision 18690)
@@ -3,7 +3,7 @@
 
 import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
 import java.io.File;
Index: trunk/test/unit/org/openstreetmap/josm/testutils/ImagePatternMatching.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/testutils/ImagePatternMatching.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/testutils/ImagePatternMatching.java	(revision 18690)
@@ -38,5 +38,5 @@
             .orElse(i -> paletteMap.getOrDefault(i, "#"));
         pattern = Optional.ofNullable(pattern)
-            .orElseGet(() -> patternCache.computeIfAbsent(patternString, k -> Pattern.compile(k)));
+            .orElseGet(() -> patternCache.computeIfAbsent(patternString, Pattern::compile));
 
         int[] columnOrRow = isColumn
@@ -48,5 +48,5 @@
 
         if (assertMatch && !result.matches()) {
-            System.err.println(String.format("Full strip failing to match pattern %s: %s", pattern, stringRepr));
+            System.err.printf("Full strip failing to match pattern %s: %s%n", pattern, stringRepr);
             fail(String.format(
                 "%s %d failed to match pattern %s",
Index: trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 18690)
@@ -666,6 +666,6 @@
         try {
             eventManager.resetState();
-        } catch (IllegalArgumentException ignored) {
-            Logging.trace(ignored);
+        } catch (IllegalArgumentException e) {
+            Logging.trace(e);
         }
     }
Index: trunk/test/unit/org/openstreetmap/josm/testutils/PluginServer.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/testutils/PluginServer.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/testutils/PluginServer.java	(revision 18690)
@@ -80,7 +80,6 @@
                 try {
                     jarFile = new JarFile(srcJar, false);
-                    jarFile.getManifest().getMainAttributes().entrySet().forEach(
-                        entry -> attrs.put(entry.getKey().toString(), entry.getValue().toString())
-                    );
+                    jarFile.getManifest().getMainAttributes()
+                            .forEach((key, value) -> attrs.put(key.toString(), value.toString()));
                 } catch (IOException e) {
                     Logging.warn(
Index: trunk/test/unit/org/openstreetmap/josm/testutils/mockers/ExtendedDialogMocker.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/testutils/mockers/ExtendedDialogMocker.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/testutils/mockers/ExtendedDialogMocker.java	(revision 18690)
@@ -88,6 +88,5 @@
 
     protected String getString(final ExtendedDialog instance) {
-        return Optional.ofNullable(this.simpleStringContentMemo.get(instance))
-            .orElseGet(() -> instance.toString());
+        return Optional.ofNullable(this.simpleStringContentMemo.get(instance)).orElseGet(instance::toString);
     }
 
@@ -185,5 +184,5 @@
     @Mock
     private void setVisible(final Invocation invocation, final boolean value) throws Throwable {
-        if (value == true) {
+        if (value) {
             try {
                 final ExtendedDialog instance = invocation.getInvokedInstance();
Index: trunk/test/unit/org/openstreetmap/josm/tools/AlphanumComparatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/AlphanumComparatorTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/tools/AlphanumComparatorTest.java	(revision 18690)
@@ -5,5 +5,4 @@
 
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 
@@ -21,5 +20,5 @@
     void testNumeric() {
         List<String> lst = Arrays.asList("1", "20", "-1", "00999", "100");
-        Collections.sort(lst, AlphanumComparator.getInstance());
+        lst.sort(AlphanumComparator.getInstance());
         assertEquals(Arrays.asList("-1", "1", "20", "100", "00999"), lst);
     }
@@ -31,5 +30,5 @@
     void testMixed() {
         List<String> lst = Arrays.asList("b1", "b20", "a5", "a00999", "a100");
-        Collections.sort(lst, AlphanumComparator.getInstance());
+        lst.sort(AlphanumComparator.getInstance());
         assertEquals(Arrays.asList("a5", "a100", "a00999", "b1", "b20"), lst);
     }
Index: trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java	(revision 18690)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.tools;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.Arrays;
@@ -8,5 +10,4 @@
 import java.util.stream.Stream;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
@@ -59,5 +60,5 @@
                 .map(locale -> LanguageInfo.getWikiLanguagePrefix(locale, type))
                 .collect(Collectors.toList());
-        Assert.assertEquals(Arrays.asList(expected), actual);
+        assertEquals(Arrays.asList(expected), actual);
     }
 
@@ -67,10 +68,10 @@
     @Test
     void testGetLocale() {
-        Assert.assertEquals(RU, LanguageInfo.getLocale("ru"));
-        Assert.assertEquals(EN_GB, LanguageInfo.getLocale("en_GB"));
-        Assert.assertEquals(CA_ES_VALENCIA, LanguageInfo.getLocale("ca_ES@valencia"));
-        Assert.assertEquals(DE_DE, LanguageInfo.getLocale("de_DE"));
-        Assert.assertEquals(DE_DE, LanguageInfo.getLocale("de_DE.UTF-8")); // LANG, LC_MEASUREMENT
-        Assert.assertEquals(PT_BR, LanguageInfo.getLocale("pt_BR.UTF-8")); // LANG, LC_MEASUREMENT
+        assertEquals(RU, LanguageInfo.getLocale("ru"));
+        assertEquals(EN_GB, LanguageInfo.getLocale("en_GB"));
+        assertEquals(CA_ES_VALENCIA, LanguageInfo.getLocale("ca_ES@valencia"));
+        assertEquals(DE_DE, LanguageInfo.getLocale("de_DE"));
+        assertEquals(DE_DE, LanguageInfo.getLocale("de_DE.UTF-8")); // LANG, LC_MEASUREMENT
+        assertEquals(PT_BR, LanguageInfo.getLocale("pt_BR.UTF-8")); // LANG, LC_MEASUREMENT
     }
 
@@ -80,7 +81,7 @@
     @Test
     void testGetJOSMLocaleCode() {
-        Assert.assertEquals("de", LanguageInfo.getJOSMLocaleCode(DE_DE));
-        Assert.assertEquals("pt_BR", LanguageInfo.getJOSMLocaleCode(PT_BR));
-        Assert.assertEquals("ca@valencia", LanguageInfo.getJOSMLocaleCode(CA_ES_VALENCIA));
+        assertEquals("de", LanguageInfo.getJOSMLocaleCode(DE_DE));
+        assertEquals("pt_BR", LanguageInfo.getJOSMLocaleCode(PT_BR));
+        assertEquals("ca@valencia", LanguageInfo.getJOSMLocaleCode(CA_ES_VALENCIA));
     }
 
@@ -90,5 +91,5 @@
     @Test
     void testGetJavaLocaleCode() {
-        Assert.assertEquals("ca__valencia", LanguageInfo.getJavaLocaleCode("ca@valencia"));
+        assertEquals("ca__valencia", LanguageInfo.getJavaLocaleCode("ca@valencia"));
     }
 
@@ -98,5 +99,5 @@
     @Test
     void testGetLanguageCodeXML() {
-        Assert.assertEquals("ca-valencia.", LanguageInfo.getLanguageCodeXML());
+        assertEquals("ca-valencia.", LanguageInfo.getLanguageCodeXML());
     }
 
@@ -106,5 +107,5 @@
     @Test
     void testGetLanguageCodeManifest() {
-        Assert.assertEquals("ca-valencia_", LanguageInfo.getLanguageCodeManifest());
+        assertEquals("ca-valencia_", LanguageInfo.getLanguageCodeManifest());
     }
 
@@ -114,5 +115,5 @@
     @Test
     void testGetLanguageCodes() {
-        Assert.assertEquals(Arrays.asList("ca_ES@valencia", "ca@valencia", "ca_ES", "ca"), LanguageInfo.getLanguageCodes(CA_ES_VALENCIA));
+        assertEquals(Arrays.asList("ca_ES@valencia", "ca@valencia", "ca_ES", "ca"), LanguageInfo.getLanguageCodes(CA_ES_VALENCIA));
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/tools/MemoryManagerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/MemoryManagerTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/tools/MemoryManagerTest.java	(revision 18690)
@@ -65,5 +65,5 @@
         MemoryHandle<Object> testMemory = manager.allocateMemory("test", 10, Object::new);
         testMemory.free();
-        assertThrows(IllegalStateException.class, () -> testMemory.get());
+        assertThrows(IllegalStateException.class, testMemory::get);
     }
 
@@ -77,13 +77,12 @@
         MemoryHandle<Object> testMemory = manager.allocateMemory("test", 10, Object::new);
         testMemory.free();
-        assertThrows(IllegalStateException.class, () -> testMemory.free());
+        assertThrows(IllegalStateException.class, testMemory::free);
     }
 
     /**
      * Test that too big allocations fail
-     * @throws NotEnoughMemoryException always
      */
     @Test
-    void testAllocationFails() throws NotEnoughMemoryException {
+    void testAllocationFails() {
         MemoryManager manager = MemoryManager.getInstance();
         long available = manager.getAvailableMemory();
@@ -97,8 +96,7 @@
     /**
      * Test that allocations with null object fail
-     * @throws NotEnoughMemoryException never
      */
     @Test
-    void testSupplierFails() throws NotEnoughMemoryException {
+    void testSupplierFails() {
         MemoryManager manager = MemoryManager.getInstance();
 
@@ -119,8 +117,7 @@
     /**
      * Test {@link MemoryManager#isAvailable(long)} for negative number
-     * @throws NotEnoughMemoryException never
      */
     @Test
-    void testIsAvailableFails() throws NotEnoughMemoryException {
+    void testIsAvailableFails() {
         MemoryManager manager = MemoryManager.getInstance();
 
@@ -154,5 +151,5 @@
 
         assertFalse(manager.resetState().isEmpty());
-        assertThrows(IllegalStateException.class, () -> testMemory.get());
+        assertThrows(IllegalStateException.class, testMemory::get);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java	(revision 18690)
@@ -2,7 +2,8 @@
 package org.openstreetmap.josm.tools;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 import org.openstreetmap.josm.data.Bounds;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.Test;
 
@@ -16,8 +17,6 @@
     @Test
     void testPositionToBounds() {
-        Assert.assertEquals(new Bounds(51.7167359, 8.7573485, 51.720724, 8.7659315),
-                OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17));
-        Assert.assertEquals(new Bounds(40.8609329, -75.7523458, 40.8633671, -75.7480542),
-                OsmUrlToBounds.positionToBounds(40.86215, -75.75020, 18));
+        assertEquals(new Bounds(51.7167359, 8.7573485, 51.720724, 8.7659315), OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17));
+        assertEquals(new Bounds(40.8609329, -75.7523458, 40.8633671, -75.7480542), OsmUrlToBounds.positionToBounds(40.86215, -75.75020, 18));
     }
 
@@ -89,5 +88,5 @@
                 Logging.trace(e);
             }
-            Assert.assertEquals(item.url, item.bounds, bounds);
+            assertEquals(item.bounds, bounds, item.url);
         }
     }
@@ -98,7 +97,7 @@
     @Test
     void testGetZoom() {
-        Assert.assertEquals(4, OsmUrlToBounds.getZoom(OsmUrlToBounds.positionToBounds(0, 0, 4)));
-        Assert.assertEquals(10, OsmUrlToBounds.getZoom(OsmUrlToBounds.positionToBounds(5, 5, 10)));
-        Assert.assertEquals(18, OsmUrlToBounds.getZoom(OsmUrlToBounds.positionToBounds(40, 20, 18)));
+        assertEquals(4, OsmUrlToBounds.getZoom(OsmUrlToBounds.positionToBounds(0, 0, 4)));
+        assertEquals(10, OsmUrlToBounds.getZoom(OsmUrlToBounds.positionToBounds(5, 5, 10)));
+        assertEquals(18, OsmUrlToBounds.getZoom(OsmUrlToBounds.positionToBounds(40, 20, 18)));
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEntryTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEntryTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEntryTest.java	(revision 18690)
@@ -2,7 +2,8 @@
 package org.openstreetmap.josm.tools.template_engine;
 
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.Set;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
@@ -34,5 +35,5 @@
         TestUtils.assumeWorkingEqualsVerifier();
         Set<Class<? extends TemplateEntry>> templates = TestUtils.getJosmSubtypes(TemplateEntry.class);
-        Assert.assertTrue(templates.size() >= 3); // if it finds less than 3 classes, something is broken
+        assertTrue(templates.size() >= 3); // if it finds less than 3 classes, something is broken
         for (Class<?> c : templates) {
             Logging.debug(c.toString());
Index: trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateParserTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateParserTest.java	(revision 18689)
+++ trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateParserTest.java	(revision 18690)
@@ -8,5 +8,4 @@
 import java.util.List;
 
-import org.junit.Assert;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
@@ -145,5 +144,5 @@
         StringBuilder sb = new StringBuilder();
         entry.appendText(sb, dataProvider);
-        Assert.assertEquals("waypointName uu i10i", sb.toString());
+        assertEquals("waypointName uu i10i", sb.toString());
     }
 
@@ -161,10 +160,10 @@
         r.put("admin_level", "2");
         templateEntry.appendText(sb, r);
-        Assert.assertEquals("NUTS 1", sb.toString());
+        assertEquals("NUTS 1", sb.toString());
 
         sb.setLength(0);
         r.put("admin_level", "5");
         templateEntry.appendText(sb, r);
-        Assert.assertEquals("5", sb.toString());
+        assertEquals("5", sb.toString());
     }
 
@@ -179,6 +178,6 @@
         StringBuilder sb = new StringBuilder();
         entry.appendText(sb, dataProvider);
-        Assert.assertEquals("name=waypointName, number=10", sb.toString());
-        Assert.assertEquals("{special:everything}", entry.toString());
+        assertEquals("name=waypointName, number=10", sb.toString());
+        assertEquals("{special:everything}", entry.toString());
     }
 
@@ -193,5 +192,5 @@
         StringBuilder sb = new StringBuilder();
         entry.appendText(sb, dataProvider);
-        Assert.assertEquals("waypointName\n10", sb.toString());
+        assertEquals("waypointName\n10", sb.toString());
     }
 
@@ -207,5 +206,5 @@
         StringBuilder sb = new StringBuilder();
         templateEntry.appendText(sb, dataProvider);
-        Assert.assertEquals("waypointNameulocalNameuspecialKey", sb.toString());
+        assertEquals("waypointNameulocalNameuspecialKey", sb.toString());
     }
 
@@ -239,5 +238,5 @@
         entry.appendText(sb, child);
 
-        Assert.assertEquals("name_parent2", sb.toString());
+        assertEquals("name_parent2", sb.toString());
     }
 
@@ -258,5 +257,5 @@
         entry.appendText(sb, child);
 
-        Assert.assertEquals("name_parent1", sb.toString());
+        assertEquals("name_parent1", sb.toString());
     }
 
@@ -285,5 +284,5 @@
         entry.appendText(sb, child2);
 
-        Assert.assertEquals("name_parent1name_parent2", sb.toString());
+        assertEquals("name_parent1name_parent2", sb.toString());
     }
 
@@ -318,5 +317,5 @@
         entry.appendText(sb, child2);
 
-        Assert.assertEquals("grandparent_namename_parent2", sb.toString());
+        assertEquals("grandparent_namename_parent2", sb.toString());
     }
 
@@ -324,5 +323,5 @@
     void testErrorsNot() {
         TemplateParser parser = new TemplateParser("!{-parent() '{name}'}");
-        assertThrows(ParseError.class, () -> parser.parse());
+        assertThrows(ParseError.class, parser::parse);
     }
 
@@ -330,5 +329,5 @@
     void testErrorOr() {
         TemplateParser parser = new TemplateParser("!{parent() | type=type1 '{name}'}");
-        assertThrows(ParseError.class, () -> parser.parse());
+        assertThrows(ParseError.class, parser::parse);
     }
 
@@ -356,5 +355,5 @@
         entry.appendText(sb, parent2);
 
-        Assert.assertEquals("child2", sb.toString());
+        assertEquals("child2", sb.toString());
     }
 
@@ -364,6 +363,6 @@
         final String s2 = new TemplateParser(s1).parse().toString();
         final String s3 = new TemplateParser(s2).parse().toString();
-        Assert.assertEquals(s1, s2);
-        Assert.assertEquals(s2, s3);
+        assertEquals(s1, s2);
+        assertEquals(s2, s3);
     }
 }
