public void verify(CvCertificate cert) {
        final Deque<CvCertificate> chain = getTrustChain(cert);

        // Only CVCA has domain parameters
        final ECDomainParameters params = chain.getLast().getBody().getPublicKey().getParams();

        while (!chain.isEmpty()) {
            final CvCertificate signer = chain.pop();
            signatureService.verify(cert, signer.getBody().getPublicKey(), params);
            cert = signer;
        }
    }
@Test
    public void shouldNotVerifyIfNotTrusted() {
        ClientException thrown = assertThrows(ClientException.class, () -> service.verify(readCvCertificate("rdw/acc/cvca.cvcert")));
        assertEquals("Could not find trust chain", thrown.getMessage());
    }