void () { // Generate junk to text regexp speed final int junkSize = 50000; final byte[] junk = new byte[junkSize]; for (int i = 0; i < junkSize; i++) { // We do not care about precision nor security, that junk for tests //noinspection NumericCastThatLosesPrecision,UnsecureRandomNumberGeneration junk[i] = (byte)(Math.random() * 10); } final String longString = StringUtil.repeat("1", junkSize); myStringJunk = String.format("%s:%s", longString, longString); myBase64Junk = Base64.getEncoder().encodeToString(junk); myStringJunkWithSpaces = StringUtil.repeat("dd ddddddddd", junkSize); myStringJunkWithSpacesAndLine = myStringJunkWithSpaces + " c:/file:12"; }