Index: /trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java	(revision 12356)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java	(revision 12357)
@@ -14,4 +14,5 @@
 import java.util.Set;
 
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
@@ -35,5 +36,4 @@
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import org.junit.Ignore;
 
 /**
@@ -110,4 +110,8 @@
             dsExpected = OsmReader.parseDataSet(is, NullProgressMonitor.INSTANCE);
         }
+
+        // set current edit layer
+        Main.getLayerManager().addLayer(new OsmDataLayer(dsToJoin, "join", null));
+
         Collection<OsmPrimitive> testPrims = dsToJoin.getPrimitives(osm -> osm.get("test") != null);
         MultiMap<String, OsmPrimitive> tests = new MultiMap<>();
