@Test
void buildCertDataFromInvalidCert() {

    assertThrows(
            CertificateUtilsException.class,
            () -> buildCertDataFromFile(
                    () -> new ByteArrayInputStream("certificate".getBytes()),
                    DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(),
                    CertificateFactory.getInstance("X.509")
            )
    );
}