Index: trunk/test/unit/org/openstreetmap/josm/data/osm/NodeTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/NodeTest.java	(revision 11360)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/NodeTest.java	(revision 11383)
@@ -80,3 +80,27 @@
         assertEquals(box1.getCenter(), new LatLon(15, 15));
     }
+
+    /**
+     * Test that {@link Node#cloneFrom} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testCloneFromIAE() {
+        new Node().cloneFrom(new Way());
+    }
+
+    /**
+     * Test that {@link Node#mergeFrom} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testMergeFromIAE() {
+        new Node().mergeFrom(new Way());
+    }
+
+    /**
+     * Test that {@link Node#load} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testLoadIAE() {
+        new Node().load(new WayData());
+    }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java	(revision 11360)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java	(revision 11383)
@@ -139,3 +139,19 @@
         assertEquals(OsmPrimitiveType.RELATION, r.getDisplayType());
     }
+
+    /**
+     * Test that {@link Relation#cloneFrom} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testCloneFromIAE() {
+        new Relation().cloneFrom(new Node());
+    }
+
+    /**
+     * Test that {@link Relation#load} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testLoadIAE() {
+        new Relation().load(new NodeData());
+    }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/WayTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/WayTest.java	(revision 11360)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/WayTest.java	(revision 11383)
@@ -55,3 +55,19 @@
         assertEquals(way.getBBox(), new BBox(10, 10));
     }
+
+    /**
+     * Test that {@link Way#cloneFrom} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testCloneFromIAE() {
+        new Way().cloneFrom(new Node());
+    }
+
+    /**
+     * Test that {@link Way#load} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testLoadIAE() {
+        new Way().load(new NodeData());
+    }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java	(revision 11360)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java	(revision 11383)
@@ -23,4 +23,5 @@
 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
 import org.openstreetmap.josm.data.gpx.WayPoint;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.projection.Projections;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
@@ -192,4 +193,12 @@
 
     /**
+     * Test that {@link GpxLayer#mergeFrom} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testMergeFromIAE() {
+        new GpxLayer(new GpxData()).mergeFrom(new OsmDataLayer(new DataSet(), "", null));
+    }
+
+    /**
      * Unit test of {@link GpxLayer#paint}.
      * @throws Exception if any error occurs
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java	(revision 11360)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java	(revision 11383)
@@ -14,5 +14,7 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
+import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.Loader;
 import org.openstreetmap.josm.io.GpxReader;
@@ -57,3 +59,11 @@
         }
     }
+
+    /**
+     * Test that {@link GeoImageLayer#mergeFrom} throws IAE for invalid arguments
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testMergeFromIAE() {
+        new GeoImageLayer(null, null).mergeFrom(new OsmDataLayer(new DataSet(), "", null));
+    }
 }
