@Test public void testEdgeCharacters() { boolean foundChars = false; for (int i = 0; i < 25; i++) { String token = TokenGenerator.generateToken(10000); foundChars = token.indexOf('a') > -1 && token.indexOf('u') > -1 && token.indexOf('z') > -1 && token.indexOf('w') > -1 && token.indexOf('0') > -1 && token.indexOf('9') > -1; if (foundChars) break; } assertTrue(foundChars); }
public static String generateToken(int length) { byte[] verifierBytes = new byte[length]; random.nextBytes(verifierBytes); return getAuthorizationCodeString(verifierBytes); }
TokenGenerator { public static String generateToken(int length) { byte[] verifierBytes = new byte[length]; random.nextBytes(verifierBytes); return getAuthorizationCodeString(verifierBytes); } }
TokenGenerator { public static String generateToken(int length) { byte[] verifierBytes = new byte[length]; random.nextBytes(verifierBytes); return getAuthorizationCodeString(verifierBytes); }  }
TokenGenerator { public static String generateToken(int length) { byte[] verifierBytes = new byte[length]; random.nextBytes(verifierBytes); return getAuthorizationCodeString(verifierBytes); }  static String generateToken(int length); }
TokenGenerator { public static String generateToken(int length) { byte[] verifierBytes = new byte[length]; random.nextBytes(verifierBytes); return getAuthorizationCodeString(verifierBytes); }  static String generateToken(int length);  }