}
*/
public void testSetAllData() {
String keyStoreStr = getPath("resources/defaultkeystore");
SSLServerPolicy sslServerPolicy = new SSLServerPolicy();
sslServerPolicy.setKeystore(keyStoreStr);
sslServerPolicy.setKeystoreType("JKS");
sslServerPolicy.setKeyPassword("defaultkeypass");
sslServerPolicy.setKeystorePassword("defaultkeypass");
sslServerPolicy.setTrustStoreType("JKS");
sslServerPolicy.setTrustStoreAlgorithm("JKS");
sslServerPolicy.setSecureSocketProtocol("TLSv1");
sslServerPolicy.setSessionCacheKey("Anything");
sslServerPolicy.setSessionCaching(true);
sslServerPolicy.setMaxChainLength(new Long(2));
sslServerPolicy.setCertValidator("Anything");
String trustStoreStr = getPath("resources/defaulttruststore");
sslServerPolicy.setTrustStore(trustStoreStr);
TestLogHandler handler = new TestLogHandler();
JettySslListenerFactory factory = createFactory(sslServerPolicy,
"https://dummyurl",
handler);
factory.decorate(sslListener);
assertTrue("Keystore not set properly",
sslListener.getKeystore().contains("resources/defaultkeystore"));
String trustStr = System.getProperty("javax.net.ssl.trustStore");
assertTrue("Trust store loaded success message not present",
trustStr.contains("resources/defaulttruststore"));
assertTrue("Keystore type not being read",
sslListener.getKeystoreType().equals("JKS"));
assertTrue("Keystore password not being read",
sslServerPolicy.getKeystorePassword().equals("defaultkeypass"));
assertTrue("Key password not being read",
sslServerPolicy.getKeyPassword().equals("defaultkeypass"));
assertTrue("Ciphersuites is being being read from somewhere unknown",
sslListener.getCipherSuites() == null);
assertTrue("Truststore type not being read",
handler.checkLogContainsString("Unsupported SSLServerPolicy property : "