@Test public void testIdGeneratorLargeLength() { String string = TokenGenerator.generateToken(1000); assertEquals(1000, string.length()); for (int i = 0; i < string.length(); i++) { assertTrue(Character.isDigit(string.charAt(i)) || Character.isLetter(string.charAt(i))); } }
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);  }