4848import com .venafi .vcert .sdk .connectors .cloud .domain .CertificateIssuingTemplate ;
4949import com .venafi .vcert .sdk .connectors .cloud .domain .CertificateIssuingTemplate .AllowedKeyType ;
5050import com .venafi .vcert .sdk .connectors .cloud .domain .Company ;
51+ import com .venafi .vcert .sdk .connectors .cloud .domain .EdgeEncryptionKey ;
5152import com .venafi .vcert .sdk .connectors .cloud .domain .User ;
5253import com .venafi .vcert .sdk .connectors .cloud .domain .UserDetails ;
5354import com .venafi .vcert .sdk .endpoint .Authentication ;
@@ -170,6 +171,11 @@ void retrieveCertificate() throws VCertException, IOException {
170171 list .add ("jackpot" );
171172 CertificateStatus status = new CertificateStatus ().status ("ISSUED" )
172173 .certificateIds (list );
174+
175+ CertificateDetails certificateDetails = new CertificateDetails ().dekHash ("12345" );
176+ EdgeEncryptionKey edgeEncryptionKey = new EdgeEncryptionKey ();
177+
178+ cloud .certificateDetails (eq ("jackpot" ), eq (apiKey ));
173179
174180 when (cloud .certificateStatus (eq ("jackpot" ), eq (apiKey )))
175181 .thenReturn (status );
@@ -180,6 +186,8 @@ void retrieveCertificate() throws VCertException, IOException {
180186 .status (200 )
181187 .body (body , Charset .forName ("UTF-8" ))
182188 .build ());
189+ when (cloud .certificateDetails (eq ("jackpot" ), eq (apiKey ))).thenReturn (certificateDetails );
190+ when (cloud .retrieveEdgeEncryptionKey (eq ("12345" ), eq (apiKey ))).thenReturn (edgeEncryptionKey );
183191
184192 PEMCollection pemCollection2 = classUnderTest .retrieveCertificate (request );
185193 assertThat (pemCollection2 ).isNotNull ();
0 commit comments