Index: trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java	(revision 17586)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java	(revision 17587)
@@ -4,4 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -12,4 +13,7 @@
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+import java.util.Collections;
+import java.util.HashSet;
 
 /**
@@ -50,4 +54,7 @@
 
         testGetKey(n, "akey", "avalue");
+        assertEquals(Collections.singleton("akey"), n.keySet());
+        assertNotEquals(HashSet.class, n.keySet().getClass()); // expect Collections.singleton
+
     }
 
