Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.groovy
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.groovy	(revision 32628)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.groovy	(revision 32629)
@@ -135,4 +135,5 @@
 
         JosmSelectionListModel model = new JosmSelectionListModel(layer1);
+        Main.getLayerManager().addActiveLayerChangeListener(model)
         DefaultListSelectionModel selectionModel = model.getListSelectionModel()
         // switch from edit layer1 to edit layer2. content of the JOSM selection
@@ -154,4 +155,6 @@
         Main.getLayerManager().removeLayer(layer1)
         assert model.getSize() == 0
+
+        Main.getLayerManager().removeActiveLayerChangeListener(model)
     }
 }
