void () { final LinkedHashMap<Integer, String> tested = new LinkedHashMap<>(); for (int i = 0; i < 10000; ++i) { tested.put(i, Integer.toString(i)); } int i = 0; for (Integer key : tested.keySet()) { assertEquals(i++, key.intValue()); } }