### Question:
KeystoreManager { public void saveKeyStore(KeyStore keyStore, File dest, char[] pw) throws KeyStoreException { enforcePasswordComplexity(pw, "invalidPassword"); try (OutputStream outStream = new FileOutputStream(dest)) { keyStore.store(outStream, pw); outStream.flush(); } catch (Exception ex) { throw new KeyStoreException(ex); } }  void copyCert(final File keyStore, final File trustStore, final String alias, final String masterPassword); KeyStore openKeyStore(File source, String storeType, char[] pw); void saveKeyStore(KeyStore keyStore, File dest, char[] pw); void addKeyPair(File keyStore, String storeType, char[] storePw, PrivateKey privKey, Certificate[] certChain, String alias); void addKeyPair(File keyStore, String storeType, char[] storePw, PrivateKey privKey, char[] keyPw, Certificate[] certChain,
            String alias); void changeKeyStorePassword(File keyStore, String storeType, char[] oldPw, char[] newPw); void changeKeyStorePassword(File keyStore, String storeType, char[] oldPw, char[] newPw, boolean changeKeyPasswords); void changeKeyPassword(File keyStore, String storeType, char[] storePw, String alias, char[] oldKeyPw, char[] newKeyPw); PrivateKey readPlainPKCS8PrivateKey(File keyFile); PrivateKey readPlainPKCS8PrivateKey(InputStream is, String algo); Collection<? extends Certificate> readPemCertificateChain(File pemFile); static String getDASCertDN(final RepositoryConfig cfg); static String getInstanceCertDN(final RepositoryConfig cfg); static final String CERTIFICATE_ALIAS; static final String INSTANCE_SECURE_ADMIN_ALIAS; static final String DEFAULT_MASTER_PASSWORD; }### Answer:
@Test(expected = IllegalArgumentException.class) public void testSaveKeyStoreBadPw() throws KeyStoreException { manager.saveKeyStore(null, null, "short".toCharArray()); }