Here you can find the source of generateStringsEntries(int cnt)
public static Map<String, String> generateStringsEntries(int cnt)
//package com.java2s; /** TestsHelper.java -//w w w . java 2 s . com * @version $Name$ * @module my.apache.ignite.examples.utils * * @purpose * @see * * @author Kamal (kamal@nmsworks.co.in) * * @created Jul 12, 2016 * $Id$ * * @bugs * * Copyright 2016-2017 NMSWorks Software Pvt Ltd. All rights reserved. * NMSWorks PROPRIETARY/CONFIDENTIAL. Use is subject to licence terms. */ import java.util.HashMap; import java.util.Map; import java.util.Random; public class Main { private static final String LETTERS_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; private static final Random RANDOM = new Random(System.currentTimeMillis()); public static Map<String, String> generateStringsEntries(int cnt) { Map<String, String> map = new HashMap<>(); for (int i = 0; i < cnt; i++) { map.put(Integer.toString(i), randomString(5)); } return map; } public static String randomString(int len) { StringBuilder builder = new StringBuilder(len); for (int i = 0; i < len; i++) builder.append(LETTERS_ALPHABET.charAt(RANDOM.nextInt(LETTERS_ALPHABET.length()))); return builder.toString(); } }