@Test(expected = IOException.class)
public void testUnencryptedEmptyPassword() throws Exception {

    PrivateKey key = SslContext.toPrivateKey(
            new File(getClass().getResource("test2_unencrypted.pem").getFile()), "");
    Assert.assertNotNull(key);
}