@Test
@DisplayName("throws exception when the signature certificate is false")
void crlThrowsAnExceptionWhenSignatureCertificateIsFalse() throws Exception
{

  X509Certificate certificate = (X509Certificate)cf.generateCertificate(CertificationRevocationListImplTest.class.getResourceAsStream("/csca-root-cert.cer"));
  Set<X509Certificate> masterList = new HashSet<>();
  masterList.add(certificate);
  CrlFetcher fetcher = getCrlFetcher(certificate);
  IllegalStateException illegalStateException = Assertions.assertThrows(IllegalStateException.class,
                                                                        () -> CertificationRevocationListImpl.initialize(masterList,
                                                                                                                         certificate,
                                                                                                                         fetcher));
  Assert.assertEquals("Exception during initial retrieval of CRL", illegalStateException.getMessage());
  Throwable certificateValidationException = illegalStateException.getCause();
  Assertions.assertTrue(certificateValidationException instanceof CertificateValidationException);
  Assertions.assertEquals("Could not verify CRL", certificateValidationException.getMessage());
}