}
public void testWrongKeyPasswordJKS() throws Exception {
String keyStoreStr = getPath("resources/defaultkeystore");
SSLClientPolicy sslClientPolicy = new SSLClientPolicy();
sslClientPolicy.setKeystore(keyStoreStr);
sslClientPolicy.setKeyPassword("defaultkeypasswrong");
sslClientPolicy.setKeystorePassword("defaultkeypass");
sslClientPolicy.setKeystoreType("JKS");
String trustStoreStr = getPath("resources/defaulttruststore");
sslClientPolicy.setTrustStore(trustStoreStr);
TestLogHandler handler = new TestLogHandler();
HttpsURLConnectionFactory factory = createFactory(sslClientPolicy,
"https://dummyurl",
handler);
factory.decorate(connection);