void () { for (int size : new int[]{0, 1, 2, 3, 4, 10, 11, 12}) { UnmodifiableHashMap<Integer, String> map = create(size); Set<Integer> keys = new java.util.HashSet<>(map.keySet()); assertEquals(IntStreamEx.range(size).boxed().toSet(), keys); Set<String> values = new java.util.HashSet<>(map.values()); assertEquals(IntStreamEx.range(size).mapToObj(String::valueOf).toSet(), values); Set<Map.Entry<Integer, String>> entries = new java.util.HashSet<>(map.entrySet()); assertEquals(IntStreamEx.range(size).mapToEntry(i -> i, String::valueOf).toSet(), entries); } }