@Test
public void testGetX509CertificateSigner() {

    System.setProperty(ZTSConsts.ZTS_PROP_CERT_SIGNER_FACTORY_CLASS,
            "com.yahoo.athenz.zts.cert.impl.SelfCertSignerFactory");
    System.setProperty(ZTSConsts.ZTS_PROP_SELF_SIGNER_PRIVATE_KEY_FNAME,
            "src/test/resources/unit_test_private_encrypted.key");
    System.setProperty(ZTSConsts.ZTS_PROP_SELF_SIGNER_PRIVATE_KEY_PASSWORD, "athenz");
    InstanceCertManager instanceManager = new InstanceCertManager(null, null, null, false);
    // first time our signer was null and we should get back the cert
    instanceManager.resetX509CertificateSigner();
    assertNotNull(instanceManager.getX509CertificateSigner());
    // second time it should be a no-op
    assertNotNull(instanceManager.getX509CertificateSigner());
    instanceManager.shutdown();
    System.clearProperty(ZTSConsts.ZTS_PROP_CERT_SIGNER_FACTORY_CLASS);
    System.clearProperty(ZTSConsts.ZTS_PROP_SELF_SIGNER_PRIVATE_KEY_FNAME);
    System.clearProperty(ZTSConsts.ZTS_PROP_SELF_SIGNER_PRIVATE_KEY_PASSWORD);
}