### Question:
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);  }### Answer:
@Test(expected = PasswordsExhaustedException.class) public void testPasswordExhausted() { Supplier<String> supplier = PasswordUtil.passwordSupplier("exhausted", new String[]{"a", "b"}); supplier.get(); supplier.get(); supplier.get(); }