void () { UnmodifiableHashMap<Long, String> map = UnmodifiableHashMap.empty(); for (int i = 0; i < 50; i++) { long key = ((long)i << 32) | i ^ 135; map = map.with(key, String.valueOf(key)); assertEquals(i + 1, map.size()); assertEquals(String.valueOf(key), map.get(key)); assertTrue(map.containsKey(key)); assertTrue(map.containsValue(String.valueOf(key))); assertFalse(map.containsValue(String.valueOf(key + 1))); assertNull(map.get(key + 1)); } }