Int2IntMap (final int keysCount) { final Int2IntMap keyValues = new Int2IntOpenHashMap(keysCount); final ThreadLocalRandom rnd = ThreadLocalRandom.current(); for (int i = 0; i < keysCount; i++) { final int key = rnd.nextInt(); final int value = rnd.nextInt(); keyValues.put(key, value); } return keyValues; }