use of com.yahoo.athenz.common.server.cert.CertSigner in project athenz by yahoo.
the class InstanceCertManagerTest method testGenerateIdentityNullCert.
@Test
public void testGenerateIdentityNullCert() {
CertSigner certSigner = Mockito.mock(com.yahoo.athenz.common.server.cert.CertSigner.class);
Mockito.when(certSigner.generateX509Certificate(Mockito.<String>any(), Mockito.any(), Mockito.anyInt())).thenReturn(null);
InstanceCertManager instanceManager = new InstanceCertManager(null, certSigner);
InstanceIdentity identity = instanceManager.generateIdentity("csr", "cn", null, 0);
assertNull(identity);
}
Aggregations