public static String getRandomNumStr ( BaseProducer baseProducer , int max , int paddingSize ) { int rndNum = baseProducer . randomBetween ( 1 , max ) ; String numStr = "" + rndNum ; while ( numStr . length ( ) < paddingSize ) { numStr = "0" + numStr ; } return numStr ; }
Get random number from 1 to max in 0 leading string format .