@SuppressWarnings("deprecation")
@Test
public void testRetrievePrivateKeyValid() {

    
    FilePrivateKeyStoreFactory factory = new FilePrivateKeyStoreFactory();
    PrivateKeyStore store = factory.create();
    
    String saveProp = System.getProperty(FilePrivateKeyStore.ATHENZ_PROP_PRIVATE_KEY);
    System.setProperty(FilePrivateKeyStore.ATHENZ_PROP_PRIVATE_KEY,
            "src/test/resources/unit_test_zts_private_k0.key");
    StringBuilder keyId = new StringBuilder(256);
    PrivateKey privKey = store.getPrivateKey("zms", "localhost", keyId);
    assertNotNull(privKey);
    
    if (saveProp == null) {
        System.clearProperty(FilePrivateKeyStore.ATHENZ_PROP_PRIVATE_KEY);
    } else {
        System.setProperty(FilePrivateKeyStore.ATHENZ_PROP_PRIVATE_KEY, saveProp);
    }
}