Methods for generating random data for testing
Very often for testing purpose huge amounts of data is required. Instead of using dictionary words it is better to generate random words and numbers. Here is a class with methods that generate random random String data. import java.util.Random; public class RandomStringGeneratorUtil { private final static char[] alphabets = { 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z' }; /** * Use this method to generate strings of specified length. * * @param rng * @param chars */ public static void randomString(Random rng, char[] chars) { for(int i=0; i chars[i] = alphabets...