class KeyConverter {

    public boolean isSavedToConfiguration(KeyInfo keyInfo) {
        if (!keyInfo.getCertRequests().isEmpty()) {
            return true;
        }
        return keyInfo.getCerts().stream()
                       .anyMatch(certificateInfo -> certificateInfo.isSavedToConfiguration());
    }

    @Autowired public  KeyConverter(TokenCertificateConverter tokenCertificateConverter,
            TokenCertificateSigningRequestConverter tokenCsrConverter);

}