### Question:
KeystoreManager { public void changeKeyPassword(File keyStore, String storeType, char[] storePw, String alias, char[] oldKeyPw, char[] newKeyPw) throws KeyStoreException { enforcePasswordComplexity(newKeyPw, "invalidPassword"); try { KeyStore ks = openKeyStore(keyStore, storeType, storePw); Key privKey = ks.getKey(alias, storePw); Certificate[] certs = ks.getCertificateChain(alias); ks.setKeyEntry(alias, privKey, newKeyPw, certs); saveKeyStore(ks, keyStore, storePw); } catch (KeyStoreException | NoSuchAlgorithmException | UnrecoverableKeyException 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 testChangeKeyPasswordBadKeyPw() throws KeyStoreException { manager.changeKeyPassword(null, "JKS", "min6chars".toCharArray(), "nullTest", null, null); }