Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 10049)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 10050)
@@ -191,6 +191,5 @@
     @Override
     public Color getColor(boolean ignoreCustom) {
-        String name = getName();
-        return Main.pref.getColor(marktr("gps marker"), name != null ? "layer "+name : null, DEFAULT_COLOR);
+        return Main.pref.getColor(marktr("gps marker"), "layer "+getName(), DEFAULT_COLOR);
     }
 
@@ -223,5 +222,5 @@
     @Override
     public String getToolTipText() {
-        return data.size()+' '+trn("marker", "markers", data.size());
+        return data.size()+" "+trn("marker", "markers", data.size());
     }
 
Index: trunk/src/org/openstreetmap/josm/plugins/PluginException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginException.java	(revision 10049)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginException.java	(revision 10050)
@@ -10,8 +10,17 @@
  *
  * @author Immanuel.Scholz
+ * @since 149
  */
 public class PluginException extends Exception {
+
+    /** Plugin proxy, can be null */
     public final transient PluginProxy plugin;
 
+    /**
+     * Constructs a new {@code PluginException} with the specified plugin and cause.
+     * @param plugin plugin proxy
+     * @param name plugin name
+     * @param cause cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
+     */
     public PluginException(PluginProxy plugin, String name, Throwable cause) {
         super(tr("An error occurred in plugin {0}", name), cause);
@@ -19,4 +28,8 @@
     }
 
+    /**
+     * Constructs a new {@code PluginException} with the specified detail message.
+     * @param message message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
+     */
     public PluginException(String message) {
         super(message);
@@ -24,4 +37,10 @@
     }
 
+    /**
+     * Constructs a new {@code PluginException} with the specified plugin name, cause and a detail message of
+     * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail message of <tt>cause</tt>).
+     * @param name plugin name
+     * @param cause cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
+     */
     public PluginException(String name, Throwable cause) {
         super(tr("An error occurred in plugin {0}", name), cause);
Index: trunk/src/org/openstreetmap/josm/plugins/PluginListParseException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginListParseException.java	(revision 10049)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginListParseException.java	(revision 10050)
@@ -2,19 +2,26 @@
 package org.openstreetmap.josm.plugins;
 
+/**
+ * Exception thrown during plugin list parsing.
+ * @since 2817
+ */
 public class PluginListParseException extends Exception {
-    public PluginListParseException() {
-        super();
+
+    /**
+     * Constructs a new {@code PluginListParseException} with the specified detail message and cause.
+     * @param message message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
+     * @param cause cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
+     */
+    public PluginListParseException(String message, Throwable cause) {
+        super(message, cause);
     }
 
-    public PluginListParseException(String arg0, Throwable arg1) {
-        super(arg0, arg1);
-    }
-
-    public PluginListParseException(String arg0) {
-        super(arg0);
-    }
-
-    public PluginListParseException(Throwable arg0) {
-        super(arg0);
+    /**
+     * Constructs a new {@code PluginListParseException} with the specified cause and a detail message of
+     * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail message of <tt>cause</tt>).
+     * @param cause cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
+     */
+    public PluginListParseException(Throwable cause) {
+        super(cause);
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java	(revision 10050)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java	(revision 10050)
@@ -0,0 +1,67 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.layer.markerlayer;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.awt.Color;
+import java.util.Arrays;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.gpx.GpxConstants;
+import org.openstreetmap.josm.data.gpx.GpxData;
+import org.openstreetmap.josm.data.gpx.GpxLink;
+import org.openstreetmap.josm.data.gpx.WayPoint;
+
+/**
+ * Unit tests of {@link MarkerLayer} class.
+ */
+public class MarkerLayerTest {
+
+    /**
+     * Setup tests
+     */
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init(true);
+        Main.pref.put("marker.traceaudio", true);
+    }
+
+    /**
+     * Unit test of {@link MarkerLayer#MarkerLayer}.
+     */
+    @Test
+    public void testMarkerLayer()  {
+        assertEquals(Color.magenta, MarkerLayer.getGenericColor());
+        MarkerLayer layer = new MarkerLayer(new GpxData(), "foo", null, null);
+
+        assertEquals("foo", layer.getName());
+        assertEquals(Color.magenta, layer.getColor(false));
+        assertNotNull(layer.getIcon());
+        assertEquals("0 markers", layer.getToolTipText());
+        assertEquals("<html>foo consists of 0 markers</html>", layer.getInfoComponent());
+        assertTrue(layer.getMenuEntries().length > 10);
+
+        GpxData gpx = new GpxData();
+        WayPoint wpt = new WayPoint(LatLon.ZERO);
+        wpt.attr.put(GpxConstants.META_LINKS, Arrays.asList(new GpxLink("https://josm.openstreetmap.de")));
+        wpt.addExtension("offset", "1.0");
+        gpx.waypoints.add(wpt);
+        wpt = new WayPoint(LatLon.ZERO);
+        wpt.addExtension("offset", "NaN");
+        gpx.waypoints.add(wpt);
+        layer = new MarkerLayer(gpx, "bar", null, null);
+
+        assertEquals("bar", layer.getName());
+        assertEquals(Color.magenta, layer.getColor(false));
+        assertNotNull(layer.getIcon());
+        assertEquals("3 markers", layer.getToolTipText());
+        assertEquals("<html>bar consists of 3 markers</html>", layer.getInfoComponent());
+        assertTrue(layer.getMenuEntries().length > 10);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginDownloadExceptionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginDownloadExceptionTest.java	(revision 10050)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginDownloadExceptionTest.java	(revision 10050)
@@ -0,0 +1,37 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+
+/**
+ * Unit tests of {@link PluginDownloadException} class.
+ */
+public class PluginDownloadExceptionTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test of {@link PluginDownloadException#PluginDownloadException}.
+     */
+    @Test
+    public void testPluginDownloadException() {
+        PluginDownloadException ex = new PluginDownloadException("foo");
+        assertEquals("foo", ex.getMessage());
+        NullPointerException npe = new NullPointerException();
+        ex = new PluginDownloadException(npe);
+        assertEquals(npe, ex.getCause());
+        ex = new PluginDownloadException("bar", npe);
+        assertEquals("bar", ex.getMessage());
+        assertEquals(npe, ex.getCause());
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginExceptionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginExceptionTest.java	(revision 10050)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginExceptionTest.java	(revision 10050)
@@ -0,0 +1,38 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+
+/**
+ * Unit tests of {@link PluginException} class.
+ */
+public class PluginExceptionTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test of {@link PluginException#PluginException}.
+     */
+    @Test
+    public void testPluginDownloadException() {
+        PluginException ex = new PluginException("foo");
+        assertEquals("foo", ex.getMessage());
+        NullPointerException npe = new NullPointerException();
+        ex = new PluginException("bar", npe);
+        assertEquals("An error occurred in plugin bar", ex.getMessage());
+        assertEquals(npe, ex.getCause());
+        ex = new PluginException(null, "foobar", npe);
+        assertEquals("An error occurred in plugin foobar", ex.getMessage());
+        assertEquals(npe, ex.getCause());
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginListParseExceptionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginListParseExceptionTest.java	(revision 10050)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginListParseExceptionTest.java	(revision 10050)
@@ -0,0 +1,35 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+
+/**
+ * Unit tests of {@link PluginListParseException} class.
+ */
+public class PluginListParseExceptionTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test of {@link PluginListParseException#PluginListParseException}.
+     */
+    @Test
+    public void testPluginListParseException() {
+        NullPointerException npe = new NullPointerException();
+        PluginListParseException ex = new PluginListParseException(npe);
+        assertEquals(npe, ex.getCause());
+        ex = new PluginListParseException("bar", npe);
+        assertEquals("bar", ex.getMessage());
+        assertEquals(npe, ex.getCause());
+    }
+}
