@Test
void throwsCertValidationExceptionBouncyCastleIsNotPresent() throws Exception
{

  Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME);
  Set<X509Certificate> trustedSet = new HashSet<>();
  trustedSet.add(certificate);
  HttpCrlFetcher crlFetcher = new HttpCrlFetcher(trustedSet);
  CertificateValidationException certificateValidationException = Assertions.assertThrows(CertificateValidationException.class,
                                                                                          () -> crlFetcher.httpDownload("mock-address"));
  Assertions.assertTrue(certificateValidationException.toString()
                                                      .contains("Failed to download CRL 'mock-address'"));
}