    @Test
    void testVerifyChain_chainCannotBeVerifiedWithAuthorityInBundle_throwsCertificateException() throws Exception {

        HashSet<X509Certificate> x509Authorities = new HashSet<>();
        x509Authorities.add(otherRootCa.getCertificate());

        val x509Bundle = new X509Bundle(TrustDomain.of("example.org"), x509Authorities);
        try {
            X509SvidValidator.verifyChain(chain, x509Bundle);
            fail("exception is expected");
        } catch (CertificateException e) {
            assertEquals("Cert chain cannot be verified", e.getMessage());
        }
    }