Index: trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java	(revision 8194)
+++ trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java	(revision 8194)
@@ -0,0 +1,35 @@
+package org.openstreetmap.josm.actions;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.Way;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.*;
+
+public class CopyActionTest {
+
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    @Test
+    public void testCopyStringWay() throws Exception {
+        final Way way = new Way(123L);
+        assertThat(CopyAction.getCopyString(Collections.singleton(way)), is("way 123"));
+    }
+
+    @Test
+    public void testCopyStringWayRelation() throws Exception {
+        final Way way = new Way(123L);
+        final Relation relation = new Relation(456);
+        assertThat(CopyAction.getCopyString(Arrays.asList(way, relation)), is("way 123,relation 456"));
+        assertThat(CopyAction.getCopyString(Arrays.asList(relation, way)), is("relation 456,way 123"));
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/SimplePrimitiveIdTest.groovy
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/SimplePrimitiveIdTest.groovy	(revision 8193)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/SimplePrimitiveIdTest.groovy	(revision 8194)
@@ -28,3 +28,9 @@
         assert SimplePrimitiveId.fuzzyParse("foo relation/123 and way/345 but also node/789").toString() == "[relation 123, way 345, node 789]"
     }
+
+    void testFromCopyAction() {
+        assert SimplePrimitiveId.fromString("node 123") == new SimplePrimitiveId(123, OsmPrimitiveType.NODE)
+        assert SimplePrimitiveId.fromString("way 123") == new SimplePrimitiveId(123, OsmPrimitiveType.WAY)
+        assert SimplePrimitiveId.fromString("relation 123") == new SimplePrimitiveId(123, OsmPrimitiveType.RELATION)
+    }
 }
