@Test
public void testLoadPrivateKeyFromKeyStore() throws IOException, GeneralSecurityException {

    Optional<String> optPassword = x509TestContext.getKeyStorePassword().length() > 0
            ? Optional.of(x509TestContext.getKeyStorePassword())
            : Optional.empty();
    PrivateKey privateKey = PemReader.loadPrivateKey(
            x509TestContext.getKeyStoreFile(KeyStoreFileType.PEM), optPassword);
    Assert.assertEquals(x509TestContext.getKeyStoreKeyPair().getPrivate(), privateKey);
}