class ConsentServiceRemote implements ConsentServiceEncrypted {

    @Override
    public CmsResponse<CmsConsent> getConsentById(String consentId) {
        try {
            ResponseEntity<CmsConsent> accountConsent = consentRestTemplate.getForEntity(consentRemoteUrls.getConsentById(), CmsConsent.class, consentId);
            return CmsResponse.<CmsConsent>builder()
                       .payload(accountConsent.getBody())
                       .build();
        } catch (CmsRestException cmsRestException) {
            log.info("Couldn't get consent by consent ID {}, HTTP response status: {}",
                     consentId, cmsRestException.getHttpStatus());
        }

        return CmsResponse.<CmsConsent>builder()
                   .error(TECHNICAL_ERROR)
                   .build();
    }

}