Int2ObjectMap<CharSequence> (int nameCount) { Random random = new Random(); Int2ObjectMap<CharSequence> map = new Int2ObjectOpenHashMap<>(); for (int i = 0; i < nameCount; i++) { String name = "some_name_" + random.nextInt() + StringUtil.repeat("a", random.nextInt(10)); int id = FSRecords.getInstance().getNameId(name); map.put(id, name); } return map; }