@Test
void testWhenDigestAlgoNullThenThrowIllegalArgumentException() throws Exception
{

  X509Certificate cert = Utils.readCert(XMLSignatureHandlerTest.class.getResourceAsStream("/EidasSignerTest_x509.cer"));
  PrivateKey pk = Utils.readPKCS12(XMLSignatureHandlerTest.class.getResourceAsStream(TEST_P12_RSA),
                                   "123456".toCharArray())
                       .getKey();
  Assertions.assertNull(signableXMLObject.getSignature());
  Assertions.assertThrows(IllegalArgumentException.class,
                          () -> XMLSignatureHandler.addSignature(signableXMLObject,
                                                                 pk,
                                                                 cert,
                                                                 XMLSignatureHandler.SigEntryType.CERTIFICATE,
                                                                 null));
}