Index: trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java	(revision 13609)
+++ trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java	(revision 13616)
@@ -162,5 +162,5 @@
     @Test(expected = IllegalArgumentException.class)
     public void testConsistencyDataset() {
-        testData.layer.data.removePrimitive(testData.existingNode);
+        testData.layer.getDataSet().removePrimitive(testData.existingNode);
         new DeleteCommand(Arrays.asList(testData.existingNode, testData.existingWay));
     }
Index: trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java	(revision 13609)
+++ trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java	(revision 13616)
@@ -63,5 +63,5 @@
         // to check that algorithm ignores it:
         Relation relationParent3 = testData.createRelation(102, new RelationMember("child", testData.existingRelation));
-        PurgeCommand command = new PurgeCommand(testData.layer.data,
+        PurgeCommand command = new PurgeCommand(testData.layer.getDataSet(),
                 Arrays.<OsmPrimitive>asList(testData.existingNode, testData.existingNode2, testData.existingWay,
                         testData.existingRelation, relationParent, relationParent2),
@@ -84,5 +84,5 @@
     @Test
     public void testUndo() {
-        PurgeCommand command = new PurgeCommand(testData.layer.data,
+        PurgeCommand command = new PurgeCommand(testData.layer.getDataSet(),
                 Arrays.<OsmPrimitive>asList(testData.existingNode, testData.existingWay),
                 Arrays.<OsmPrimitive>asList(testData.existingWay));
@@ -108,5 +108,5 @@
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
         ArrayList<OsmPrimitive> added = new ArrayList<>();
-        PurgeCommand command = new PurgeCommand(testData.layer.data, Arrays.<OsmPrimitive>asList(testData.existingNode),
+        PurgeCommand command = new PurgeCommand(testData.layer.getDataSet(), Arrays.<OsmPrimitive>asList(testData.existingNode),
                 Arrays.<OsmPrimitive>asList(testData.existingRelation));
         command.fillModifiedData(modified, deleted, added);
@@ -122,5 +122,5 @@
     @Test
     public void testGetParticipatingPrimitives() {
-        PurgeCommand command = new PurgeCommand(testData.layer.data, Arrays.<OsmPrimitive>asList(testData.existingNode),
+        PurgeCommand command = new PurgeCommand(testData.layer.getDataSet(), Arrays.<OsmPrimitive>asList(testData.existingNode),
                 Arrays.<OsmPrimitive>asList(testData.existingRelation));
         assertArrayEquals(new Object[] {testData.existingNode }, command.getParticipatingPrimitives().toArray());
@@ -133,9 +133,9 @@
     public void testDescription() {
         List<OsmPrimitive> shortList = Arrays.<OsmPrimitive>asList(testData.existingWay);
-        assertTrue(new PurgeCommand(testData.layer.data, shortList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
+        assertTrue(new PurgeCommand(testData.layer.getDataSet(), shortList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
                 .matches("Purged 1 object"));
         List<OsmPrimitive> longList = Arrays.<OsmPrimitive>asList(testData.existingNode, testData.existingNode2,
                 testData.existingWay);
-        assertTrue(new PurgeCommand(testData.layer.data, longList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
+        assertTrue(new PurgeCommand(testData.layer.getDataSet(), longList, Arrays.<OsmPrimitive>asList()).getDescriptionText()
                 .matches("Purged 3 objects"));
     }
Index: trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java	(revision 13609)
+++ trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java	(revision 13616)
@@ -51,7 +51,7 @@
     @Test
     public void testExecute() {
-        SelectCommand command = new SelectCommand(testData.layer.data, Arrays.asList(testData.existingNode, testData.existingWay));
+        SelectCommand command = new SelectCommand(testData.layer.getDataSet(), Arrays.asList(testData.existingNode, testData.existingWay));
 
-        testData.layer.data.setSelected(Arrays.asList(testData.existingNode2));
+        testData.layer.getDataSet().setSelected(Arrays.asList(testData.existingNode2));
 
         command.executeCommand();
@@ -68,5 +68,5 @@
     public void testExecuteAfterModify() {
         List<OsmPrimitive> list = new ArrayList<>(Arrays.asList(testData.existingNode, testData.existingWay));
-        SelectCommand command = new SelectCommand(testData.layer.data, list);
+        SelectCommand command = new SelectCommand(testData.layer.getDataSet(), list);
 
         list.remove(testData.existingNode);
@@ -85,6 +85,6 @@
     @Test
     public void testUndo() {
-        SelectCommand command = new SelectCommand(testData.layer.data, Arrays.asList(testData.existingNode, testData.existingWay));
-        testData.layer.data.setSelected(Arrays.asList(testData.existingNode2));
+        SelectCommand command = new SelectCommand(testData.layer.getDataSet(), Arrays.asList(testData.existingNode, testData.existingWay));
+        testData.layer.getDataSet().setSelected(Arrays.asList(testData.existingNode2));
 
         command.executeCommand();
@@ -111,5 +111,5 @@
         ArrayList<OsmPrimitive> deleted = new ArrayList<>();
         ArrayList<OsmPrimitive> added = new ArrayList<>();
-        SelectCommand command = new SelectCommand(testData.layer.data, Arrays.asList(testData.existingNode, testData.existingWay));
+        SelectCommand command = new SelectCommand(testData.layer.getDataSet(), Arrays.asList(testData.existingNode, testData.existingWay));
         command.fillModifiedData(modified, deleted, added);
         // intentionally empty.
@@ -124,5 +124,5 @@
     @Test
     public void testGetParticipatingPrimitives() {
-        SelectCommand command = new SelectCommand(testData.layer.data, Arrays.asList(testData.existingNode));
+        SelectCommand command = new SelectCommand(testData.layer.getDataSet(), Arrays.asList(testData.existingNode));
         command.executeCommand();
         assertArrayEquals(new Object[] {testData.existingNode}, command.getParticipatingPrimitives().toArray());
@@ -134,5 +134,5 @@
     @Test
     public void testDescription() {
-        DataSet ds = testData.layer.data;
+        DataSet ds = testData.layer.getDataSet();
         assertTrue(new SelectCommand(ds, Arrays.<OsmPrimitive>asList(testData.existingNode))
                 .getDescriptionText().matches("Selected 1 object"));
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java	(revision 13609)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java	(revision 13616)
@@ -49,5 +49,5 @@
     @Test
     public void testExecuteUndoCommand() {
-        DataSet ds = testData.layer.data;
+        DataSet ds = testData.layer.getDataSet();
         Conflict<Node> conflict = new Conflict<>(testData.existingNode, testData.existingNode2);
         ConflictAddCommand cmd = new ConflictAddCommand(ds, conflict);
@@ -66,5 +66,5 @@
     public void testGetDescriptionIcon() {
         Conflict<Node> conflict = new Conflict<>(testData.existingNode, testData.existingNode2);
-        assertNotNull(new ConflictAddCommand(testData.layer.data, conflict).getDescriptionIcon());
+        assertNotNull(new ConflictAddCommand(testData.layer.getDataSet(), conflict).getDescriptionIcon());
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/event/SelectionEventManagerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/event/SelectionEventManagerTest.java	(revision 13609)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/event/SelectionEventManagerTest.java	(revision 13616)
@@ -77,11 +77,11 @@
 
         // active layer, should change
-        testData1.layer.data.setSelected(testData1.existingNode.getPrimitiveId());
+        testData1.layer.getDataSet().setSelected(testData1.existingNode.getPrimitiveId());
         assertSelectionEquals(listeners, new HashSet<OsmPrimitive>(Arrays.asList(testData1.existingNode)));
 
-        testData1.layer.data.clearSelection(testData1.existingNode.getPrimitiveId());
+        testData1.layer.getDataSet().clearSelection(testData1.existingNode.getPrimitiveId());
         assertSelectionEquals(listeners, new HashSet<OsmPrimitive>(Arrays.asList()));
 
-        testData1.layer.data.addSelected(testData1.existingNode2.getPrimitiveId());
+        testData1.layer.getDataSet().addSelected(testData1.existingNode2.getPrimitiveId());
         assertSelectionEquals(listeners, new HashSet<OsmPrimitive>(Arrays.asList(testData1.existingNode2)));
 
@@ -91,8 +91,8 @@
 
         // This should not trigger anything, since the layer is not active any more.
-        testData1.layer.data.clearSelection(testData1.existingNode.getPrimitiveId());
+        testData1.layer.getDataSet().clearSelection(testData1.existingNode.getPrimitiveId());
         assertSelectionEquals(listeners, null);
 
-        testData2.layer.data.setSelected(testData2.existingNode.getPrimitiveId());
+        testData2.layer.getDataSet().setSelected(testData2.existingNode.getPrimitiveId());
         assertSelectionEquals(listeners, new HashSet<OsmPrimitive>(Arrays.asList(testData2.existingNode)));
 
@@ -104,5 +104,5 @@
 
         // no event triggered now
-        testData2.layer.data.setSelected(testData2.existingNode2.getPrimitiveId());
+        testData2.layer.getDataSet().setSelected(testData2.existingNode2.getPrimitiveId());
         assertSelectionEquals(listeners, null);
     }
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 13609)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 13616)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.IPrimitive;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmUtils;
@@ -233,5 +234,5 @@
             List<TestError> errors = test.getErrors();
             assertEquals(errorsCount, errors.size());
-            Set<Set<OsmPrimitive>> primitives = new HashSet<>();
+            Set<Set<IPrimitive>> primitives = new HashSet<>();
             for (TestError e : errors) {
                 primitives.add(new HashSet<>(e.getPrimitives()));
