Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/NoteLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/NoteLayerTest.java	(revision 13148)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/NoteLayerTest.java	(revision 13162)
@@ -56,3 +56,22 @@
         // CHECKSTYLE.ON: LineLength
     }
+
+    /**
+     * Unit test of {@link NoteLayer#replaceLinks}.
+     */
+    @Test
+    public void testReplaceLinks() {
+        // empty string
+        assertEquals("", NoteLayer.replaceLinks(""));
+        // no link
+        assertEquals("no http link", NoteLayer.replaceLinks("no http link"));
+        // just one link
+        assertEquals("<a href=\"https://www.example.com/test\">https://www.example.com/\u200btest</a>",
+                NoteLayer.replaceLinks("https://www.example.com/test"));
+        // CHECKSTYLE.OFF: LineLength
+        // text with several links (with and without slash)
+        assertEquals("foo <a href=\"https://foo.example.com/test\">https://foo.example.com/\u200btest</a> bar <a href=\"https://bar.example.com\">https://bar.example.com</a> baz",
+                NoteLayer.replaceLinks("foo https://foo.example.com/test bar https://bar.example.com baz"));
+        // CHECKSTYLE.ON: LineLength
+    }
 }
