Index: trunk/test/unit/org/openstreetmap/josm/actions/PasteTagsActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/PasteTagsActionTest.java	(revision 9968)
+++ trunk/test/unit/org/openstreetmap/josm/actions/PasteTagsActionTest.java	(revision 9968)
@@ -0,0 +1,55 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.actions;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.actions.PasteTagsAction.TagPaster;
+import org.openstreetmap.josm.data.osm.NodeData;
+import org.openstreetmap.josm.data.osm.PrimitiveData;
+import org.openstreetmap.josm.data.osm.RelationData;
+import org.openstreetmap.josm.data.osm.WayData;
+
+/**
+ * Unit tests for class {@link PasteTagsAction}.
+ */
+public class PasteTagsActionTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    private static boolean isHeterogeneousSource(PrimitiveData... t) {
+        return new TagPaster(Arrays.asList(t), null).isHeterogeneousSource();
+    }
+
+    /**
+     * Unit test of {@link TagPaster#isHeterogeneousSource}.
+     */
+    @Test
+    public void testTagPasterIsHeterogeneousSource() {
+        // 0 item
+        assertFalse(isHeterogeneousSource());
+        // 1 item
+        assertFalse(isHeterogeneousSource(new NodeData()));
+        assertFalse(isHeterogeneousSource(new WayData()));
+        assertFalse(isHeterogeneousSource(new RelationData()));
+        // 2 items of same type
+        assertFalse(isHeterogeneousSource(new NodeData(), new NodeData()));
+        assertFalse(isHeterogeneousSource(new WayData(), new WayData()));
+        assertFalse(isHeterogeneousSource(new RelationData(), new RelationData()));
+        // 2 items of different type
+        assertTrue(isHeterogeneousSource(new NodeData(), new WayData()));
+        assertTrue(isHeterogeneousSource(new NodeData(), new RelationData()));
+        assertTrue(isHeterogeneousSource(new WayData(), new RelationData()));
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java	(revision 9967)
+++ trunk/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java	(revision 9968)
@@ -3,4 +3,5 @@
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
@@ -102,4 +103,39 @@
     }
 
+    /**
+     * Unit test of {@link SplitWayAction#findVia}.
+     */
+    @Test
+    public void testFindVia() {
+        // empty relation
+        assertNull(SplitWayAction.findVia(new Relation(), null));
+        // restriction relation without via member
+        Relation r = new Relation();
+        r.addMember(new RelationMember("", new Node()));
+        assertNull(SplitWayAction.findVia(r, "restriction"));
+        // restriction relation with via member
+        r = new Relation();
+        OsmPrimitive via = new Node();
+        r.addMember(new RelationMember("via", via));
+        assertEquals(via, SplitWayAction.findVia(r, "restriction"));
+        // destination_sign relation without sign nor intersection
+        r = new Relation();
+        r.addMember(new RelationMember("", new Node()));
+        assertNull(SplitWayAction.findVia(r, "destination_sign"));
+        // destination_sign with sign
+        r = new Relation();
+        via = new Node();
+        r.addMember(new RelationMember("sign", via));
+        assertEquals(via, SplitWayAction.findVia(r, "destination_sign"));
+        // destination_sign with intersection
+        r = new Relation();
+        via = new Node();
+        r.addMember(new RelationMember("intersection", via));
+        assertEquals(via, SplitWayAction.findVia(r, "destination_sign"));
+    }
+
+    /**
+     * Unit tests of route relations.
+     */
     @Test
     public void testRouteRelation() {
@@ -143,5 +179,4 @@
         dataSet.setSelected(Arrays.asList(w2, n3, n4, n5));
 
-
         final SplitWayAction.Strategy strategy = new SplitWayAction.Strategy() {
 
@@ -174,5 +209,4 @@
         assertFirstLastNodeIs(((Way) route.getMemberPrimitivesList().get(5)), n6);
         assertFirstLastNodeIs(((Way) route.getMemberPrimitivesList().get(5)), n7);
-
     }
 
