@Test(expected = PasswordsExhaustedException.class) public void testPasswordExhausted() { Supplier<String> supplier = PasswordUtil.passwordSupplier("exhausted", new String[]{"a", "b"}); supplier.get(); supplier.get(); supplier.get(); }
public Supplier<String> passwordSupplier() { return () -> generatePassword(); }
PasswordUtil { public Supplier<String> passwordSupplier() { return () -> generatePassword(); } }
PasswordUtil { public Supplier<String> passwordSupplier() { return () -> generatePassword(); } PasswordUtil();  PasswordUtil(SecureRandom secureRandom); }
PasswordUtil { public Supplier<String> passwordSupplier() { return () -> generatePassword(); } PasswordUtil();  PasswordUtil(SecureRandom secureRandom); String generatePassword(); Supplier<String> passwordSupplier(); static Supplier<String> passwordSupplier(String password); static Supplier<String> passwordSupplier(String exhaustedMessage, String[] passwords); }
PasswordUtil { public Supplier<String> passwordSupplier() { return () -> generatePassword(); } PasswordUtil();  PasswordUtil(SecureRandom secureRandom); String generatePassword(); Supplier<String> passwordSupplier(); static Supplier<String> passwordSupplier(String password); static Supplier<String> passwordSupplier(String exhaustedMessage, String[] passwords);  }