@Test
public void testGetInstanceWithBadCert() throws Exception {

    SSLConfig sslConfig = new SSLConfig();
    sslConfig.setKeyStoreName("FOO");
    sslConfig.setKeyStorePassword("BAR".toCharArray());
    sslConfig.setKeyStoreType("JKS");
    sslConfig.setKeyManagerFactoryAlgorithm("SunX509");
    SSLContextFactory.getInstance(sslConfig);
}