Search in sources :

Example 6 with RevocationRequest

use of com.venafi.vcert.sdk.certificate.RevocationRequest in project vcert-java by Venafi.

the class VCertClientTest method revokeCertificateWithServerError.

@Test
@DisplayName("Revoke certificate with server error")
void revokeCertificateWithServerError() throws VCertException {
    final RevocationRequest revocationRequest = mock(RevocationRequest.class);
    doThrow(new FeignException.InternalServerError("Error", request, "".getBytes())).when(connector).revokeCertificate(revocationRequest);
    assertThrows(VCertException.class, () -> classUnderTest.revokeCertificate(revocationRequest));
}
Also used : RevocationRequest(com.venafi.vcert.sdk.certificate.RevocationRequest) FeignException(feign.FeignException) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

RevocationRequest (com.venafi.vcert.sdk.certificate.RevocationRequest)6 Test (org.junit.jupiter.api.Test)6 DisplayName (org.junit.jupiter.api.DisplayName)4 CertificateRequest (com.venafi.vcert.sdk.certificate.CertificateRequest)2 ZoneConfiguration (com.venafi.vcert.sdk.connectors.ZoneConfiguration)2 FeignException (feign.FeignException)2