Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java	(revision 2990)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java	(revision 3025)
@@ -17,4 +17,5 @@
 
 import org.junit.Test;
+import org.openstreetmap.josm.data.osm.DatasetFactory;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.Way;
@@ -23,4 +24,8 @@
 public class NodeListMergeModelTest {
 
+    private DatasetFactory my = new DatasetFactory();
+    private DatasetFactory their = new DatasetFactory();
+
+    @SuppressWarnings("unchecked")
     protected List<Node> inspectNodeList(NodeListMergeModel model, String name) {
         return method("get" + name + "Entries")
@@ -46,5 +51,5 @@
             try {
                 int rows[] = (int[])idx[i];
-                if (rows == null || rows.length != 2) {
+                if (rows.length != 2) {
                     fail("illegal selection range. Either null or not length 2: " + Arrays.toString(rows));
                 }
@@ -65,8 +70,9 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -88,9 +94,9 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -111,17 +117,12 @@
     }
 
-
-
-
-
     @Test
     public void test_copyMyNodesToTop_3() {
         NodeListMergeModel model = new NodeListMergeModel();
 
-
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+        Way theirWay = their.addWay(1);
 
 
@@ -146,10 +147,9 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        myWay.addNode(new Node(4));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+        myWay.addNode(my.addNode(4));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -175,8 +175,8 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -196,8 +196,8 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -222,8 +222,8 @@
 
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -249,9 +249,9 @@
 
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        myWay.addNode(new Node(4));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+        myWay.addNode(my.addNode(4));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -281,8 +281,8 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(1));
-        myWay.addNode(new Node(2));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(1));
+        myWay.addNode(my.addNode(2));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -309,8 +309,8 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(1));
-        myWay.addNode(new Node(2));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(1));
+        myWay.addNode(my.addNode(2));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -337,8 +337,8 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(1));
-        myWay.addNode(new Node(2));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(1));
+        myWay.addNode(my.addNode(2));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -356,5 +356,5 @@
 
         try {
-            model.copyMyBeforeCurrent(new int[]{0,1}, 3);
+            model.copyMyBeforeCurrent(new int[]{0,1}, 4);
             fail("expected IllegalArgumentException");
         } catch(IllegalArgumentException e) {
@@ -370,8 +370,8 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(1));
-        myWay.addNode(new Node(2));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(1));
+        myWay.addNode(my.addNode(2));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -398,9 +398,9 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(1));
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(1));
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -428,9 +428,9 @@
         NodeListMergeModel model = new NodeListMergeModel();
 
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(1));
-        myWay.addNode(new Node(2));
-        myWay.addNode(new Node(3));
-        Way theirWay = new Way(1);
+        Way myWay = my.addWay(1, 1);
+        myWay.addNode(my.addNode(1));
+        myWay.addNode(my.addNode(2));
+        myWay.addNode(my.addNode(3));
+        Way theirWay = their.addWay(1);
 
         model.populate(myWay, theirWay);
@@ -453,33 +453,4 @@
     }
 
-    @Test
-    public void test_copyMyNodesAfterCurrent_4() {
-        NodeListMergeModel model = new NodeListMergeModel();
-
-        Way myWay = new Way(1, 1);
-        myWay.addNode(new Node(1));
-        myWay.addNode(new Node(2));
-        Way theirWay = new Way(1);
-
-        model.populate(myWay, theirWay);
-        List<Node> mergedNodes = inspectNodeList(model, "Merged");
-        mergedNodes.add(new Node(10));
-        mergedNodes.add(new Node(11));
-        mergedNodes.add(new Node(12));
-
-        try {
-            model.copyMyAfterCurrent(new int[]{0,1}, -1);
-            fail("expected IllegalArgumentException");
-        } catch(IllegalArgumentException e) {
-            // OK
-        }
-
-        try {
-            model.copyMyAfterCurrent(new int[]{0,1}, 3);
-            fail("expected IllegalArgumentException");
-        } catch(IllegalArgumentException e) {
-            // OK
-        }
-    }
 
     /* ----------------------------------------------------------------------------- */
@@ -664,4 +635,5 @@
     /* PropertyChangeListener                                                        */
     /* ----------------------------------------------------------------------------- */
+    @SuppressWarnings("unchecked")
     @Test
     public void addPropertyChangeListener() {
@@ -676,6 +648,6 @@
         model.addPropertyChangeListener(listener);
 
-        ArrayList<PropertyChangeListener> listeners = field("listeners")
-        .ofType(ArrayList.class)
+        List<PropertyChangeListener> listeners = field("listeners")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -685,4 +657,5 @@
     }
 
+    @SuppressWarnings("unchecked")
     @Test
     public void removePropertyChangeListener() {
@@ -698,6 +671,6 @@
         model.removePropertyChangeListener(listener);
 
-        ArrayList<PropertyChangeListener> listeners = field("listeners")
-        .ofType(ArrayList.class)
+        List<PropertyChangeListener> listeners = field("listeners")
+        .ofType(List.class)
         .in(model)
         .get();
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/properties/PropertiesMergeModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/properties/PropertiesMergeModelTest.java	(revision 2990)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/properties/PropertiesMergeModelTest.java	(revision 3025)
@@ -2,7 +2,7 @@
 package org.openstreetmap.josm.gui.conflict.properties;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.*;
 
 import java.util.Observable;
@@ -13,4 +13,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.Relation;
@@ -48,14 +49,22 @@
     @Test
     public void populate() {
+        DataSet d1 = new DataSet();
+        DataSet d2 = new DataSet();
         Node n1 = new Node(1);
         Node n2 = new Node(1);
+        d1.addPrimitive(n1);
+        d2.addPrimitive(n2);
         model.populate(n1, n2);
 
         Way w1 = new Way(1);
         Way w2 = new Way(1);
+        d1.addPrimitive(w1);
+        d2.addPrimitive(w2);
         model.populate(w2, w2);
 
         Relation r1 = new Relation(1);
         Relation r2 = new Relation(1);
+        d1.addPrimitive(r1);
+        d2.addPrimitive(r2);
         model.populate(r1, r2);
     }
@@ -63,6 +72,11 @@
     @Test
     public void decidingAboutCoords() {
+        DataSet d1 = new DataSet();
+        DataSet d2 = new DataSet();
+
         Node n1 = new Node(1);
         Node n2 = new Node(1);
+        d1.addPrimitive(n1);
+        d2.addPrimitive(n2);
         model.populate(n1, n2);
         assertFalse(model.hasCoordConflict());
@@ -73,5 +87,5 @@
 
 
-        n1 = new Node(1);
+        n1.cloneFrom(new Node(1));
         n2.setCoor(new LatLon(2,2));
         model.populate(n1, n2);
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeModelTest.java	(revision 2990)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeModelTest.java	(revision 3025)
@@ -8,5 +8,5 @@
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
-import java.util.ArrayList;
+import java.util.List;
 
 import org.junit.Test;
@@ -29,5 +29,5 @@
         model.addPropertyChangeListener(listener);
 
-        ArrayList<?> list = field("listeners").ofType(ArrayList.class)
+        List<?> list = field("listeners").ofType(List.class)
         .in(model)
         .get();
@@ -48,6 +48,6 @@
         model.removePropertyChangeListener(listener);
 
-        ArrayList<?> list = field("listeners")
-        .ofType(ArrayList.class)
+        List<?> list = field("listeners")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -63,6 +63,6 @@
         model.populate(my, their);
 
-        ArrayList<TagMergeItem> list = field("tagMergeItems")
-        .ofType(ArrayList.class)
+        List<TagMergeItem> list = field("tagMergeItems")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -80,6 +80,6 @@
         model.populate(my, their);
 
-        ArrayList<TagMergeItem> list = field("tagMergeItems")
-        .ofType(ArrayList.class)
+        List<TagMergeItem> list = field("tagMergeItems")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -96,6 +96,6 @@
         model.populate(my, their);
 
-        ArrayList<TagMergeItem> list = field("tagMergeItems")
-        .ofType(ArrayList.class)
+        List<TagMergeItem> list = field("tagMergeItems")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -117,6 +117,6 @@
         model.populate(my, their);
 
-        ArrayList<TagMergeItem> list = field("tagMergeItems")
-        .ofType(ArrayList.class)
+        List<TagMergeItem> list = field("tagMergeItems")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -139,6 +139,6 @@
         model.populate(my, their);
 
-        ArrayList<TagMergeItem> list = field("tagMergeItems")
-        .ofType(ArrayList.class)
+        List<TagMergeItem> list = field("tagMergeItems")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -158,6 +158,6 @@
         model.addItem(item);
 
-        ArrayList<TagMergeItem> list = field("tagMergeItems")
-        .ofType(ArrayList.class)
+        List<TagMergeItem> list = field("tagMergeItems")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -177,6 +177,6 @@
         model.addItem(item);
 
-        ArrayList<TagMergeItem> list = field("tagMergeItems")
-        .ofType(ArrayList.class)
+        List<TagMergeItem> list = field("tagMergeItems")
+        .ofType(List.class)
         .in(model)
         .get();
@@ -207,6 +207,6 @@
         }
 
-        ArrayList<TagMergeItem> list = field("tagMergeItems")
-        .ofType(ArrayList.class)
+        List<TagMergeItem> list = field("tagMergeItems")
+        .ofType(List.class)
         .in(model)
         .get();
