Index: /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 11930)
+++ /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 11931)
@@ -170,5 +170,5 @@
     }
 
-    private enum Polarity {
+    enum Polarity {
         NORTH(LatLon.NORTH_POLE),
         SOUTH(LatLon.SOUTH_POLE);
@@ -180,5 +180,5 @@
         }
 
-        private LatLon getLatLon() {
+        LatLon getLatLon() {
             return latlon;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 11930)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 11931)
@@ -142,39 +142,5 @@
     @Override
     public LayerPainter attachToMapView(MapViewEvent event) {
-        event.getMapView().addMouseListener(new MouseAdapter() {
-            @Override
-            public void mousePressed(MouseEvent e) {
-                if (e.getButton() != MouseEvent.BUTTON1)
-                    return;
-                boolean mousePressedInButton = false;
-                for (Marker mkr : data) {
-                    if (mkr.containsPoint(e.getPoint())) {
-                        mousePressedInButton = true;
-                        break;
-                    }
-                }
-                if (!mousePressedInButton)
-                    return;
-                mousePressed = true;
-                if (isVisible()) {
-                    invalidate();
-                }
-            }
-
-            @Override
-            public void mouseReleased(MouseEvent ev) {
-                if (ev.getButton() != MouseEvent.BUTTON1 || !mousePressed)
-                    return;
-                mousePressed = false;
-                if (!isVisible())
-                    return;
-                for (Marker mkr : data) {
-                    if (mkr.containsPoint(ev.getPoint())) {
-                        mkr.actionPerformed(new ActionEvent(this, 0, null));
-                    }
-                }
-                invalidate();
-            }
-        });
+        event.getMapView().addMouseListener(new MarkerMouseAdapter());
 
         if (event.getMapView().playHeadMarker == null) {
@@ -475,4 +441,40 @@
     }
 
+    private final class MarkerMouseAdapter extends MouseAdapter {
+        @Override
+        public void mousePressed(MouseEvent e) {
+            if (e.getButton() != MouseEvent.BUTTON1)
+                return;
+            boolean mousePressedInButton = false;
+            for (Marker mkr : data) {
+                if (mkr.containsPoint(e.getPoint())) {
+                    mousePressedInButton = true;
+                    break;
+                }
+            }
+            if (!mousePressedInButton)
+                return;
+            mousePressed = true;
+            if (isVisible()) {
+                invalidate();
+            }
+        }
+
+        @Override
+        public void mouseReleased(MouseEvent ev) {
+            if (ev.getButton() != MouseEvent.BUTTON1 || !mousePressed)
+                return;
+            mousePressed = false;
+            if (!isVisible())
+                return;
+            for (Marker mkr : data) {
+                if (mkr.containsPoint(ev.getPoint())) {
+                    mkr.actionPerformed(new ActionEvent(this, 0, null));
+                }
+            }
+            invalidate();
+        }
+    }
+
     public static final class ShowHideMarkerText extends AbstractAction implements LayerAction {
         private final transient MarkerLayer layer;
Index: /trunk/test/unit/org/openstreetmap/josm/data/projection/CustomProjectionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/projection/CustomProjectionTest.java	(revision 11930)
+++ /trunk/test/unit/org/openstreetmap/josm/data/projection/CustomProjectionTest.java	(revision 11931)
@@ -10,4 +10,6 @@
 import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.projection.CustomProjection.Polarity;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -71,3 +73,12 @@
                 });
     }
+
+    /**
+     * Test {@link CustomProjection.Polarity}.
+     */
+    @Test
+    public void testPolarity() {
+        assertEquals(LatLon.NORTH_POLE, Polarity.NORTH.getLatLon());
+        assertEquals(LatLon.SOUTH_POLE, Polarity.SOUTH.getLatLon());
+    }
 }
Index: /trunk/test/unit/org/openstreetmap/josm/data/projection/proj/LonLatTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/projection/proj/LonLatTest.java	(revision 11931)
+++ /trunk/test/unit/org/openstreetmap/josm/data/projection/proj/LonLatTest.java	(revision 11931)
@@ -0,0 +1,30 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.projection.proj;
+
+import static org.junit.Assert.assertFalse;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+/**
+ * Tests for {@link LonLat}.
+ */
+public class LonLatTest {
+    /**
+     * Setup rule.
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules();
+
+    /**
+     * Test {@link LonLat#lonIsLinearToEast}
+     */
+    @Test
+    public void testLonIsLinearToEast() {
+        assertFalse(new LonLat().lonIsLinearToEast());
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/data/projection/proj/MercatorTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/projection/proj/MercatorTest.java	(revision 11931)
+++ /trunk/test/unit/org/openstreetmap/josm/data/projection/proj/MercatorTest.java	(revision 11931)
@@ -0,0 +1,30 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.projection.proj;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+/**
+ * Tests for {@link Mercator}.
+ */
+public class MercatorTest {
+    /**
+     * Setup rule.
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules();
+
+    /**
+     * Test {@link Mercator#lonIsLinearToEast}
+     */
+    @Test
+    public void testLonIsLinearToEast() {
+        assertTrue(new Mercator().lonIsLinearToEast());
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/TagTransferableTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/TagTransferableTest.java	(revision 11931)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/TagTransferableTest.java	(revision 11931)
@@ -0,0 +1,67 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.datatransfer;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.gui.datatransfer.data.TagTransferData;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+/**
+ * Unit tests of {@link TagTransferable} class.
+ */
+public class TagTransferableTest {
+
+    /**
+     * Setup tests
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules();
+
+    /**
+     * Test of {@link TagTransferable#isDataFlavorSupported} method.
+     */
+    @Test
+    public void testIsDataFlavorSupported() {
+        TagTransferable tt = new TagTransferable(null);
+        assertTrue(tt.isDataFlavorSupported(TagTransferData.FLAVOR));
+        assertTrue(tt.isDataFlavorSupported(DataFlavor.stringFlavor));
+        assertFalse(tt.isDataFlavorSupported(DataFlavor.imageFlavor));
+        assertFalse(tt.isDataFlavorSupported(null));
+    }
+
+    /**
+     * Test of {@link RelationMemberTransferable#getTransferData} method - nominal case.
+     * @throws Exception if an error occurs
+     */
+    @Test
+    public void testGetTransferDataNominal() throws Exception {
+        Map<String, String> tags = new HashMap<>();
+        tags.put("foo", "bar");
+        TagTransferable tt = new TagTransferable(new TagTransferData(tags));
+        assertEquals("foo=bar", tt.getTransferData(DataFlavor.stringFlavor));
+        assertEquals(tags, ((TagTransferData) tt.getTransferData(TagTransferData.FLAVOR)).getTags());
+    }
+
+    /**
+     * Test of {@link TagTransferable#getTransferData} method - error case.
+     * @throws UnsupportedFlavorException always
+     * @throws IOException never
+     */
+    @Test(expected = UnsupportedFlavorException.class)
+    public void testGetTransferDataError() throws UnsupportedFlavorException, IOException {
+        new TagTransferable(null).getTransferData(null);
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/MarkerLayerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/MarkerLayerTest.java	(revision 11931)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/MarkerLayerTest.java	(revision 11931)
@@ -0,0 +1,43 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.layer;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.gpx.GpxData;
+import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+/**
+ * Unit tests of {@link MarkerLayer} class.
+ */
+public class MarkerLayerTest {
+
+    /**
+     * For creating layers
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().commands();
+
+    /**
+     * Unit test of {@code Main.map.mapView.playHeadMarker}.
+     */
+    @Test
+    public void testPlayHeadMarker() {
+        try {
+            MarkerLayer layer = new MarkerLayer(new GpxData(), null, null, null);
+            assertNull(Main.map.mapView.playHeadMarker);
+            Main.getLayerManager().addLayer(layer);
+            assertNotNull(Main.map.mapView.playHeadMarker);
+            Main.getLayerManager().removeLayer(layer);
+        } finally {
+            Main.map.mapView.playHeadMarker = null;
+        }
+    }
+}
