class AisAuthService extends CmsAuthorisationService<ConsentEntity> {

    @Override
    public Optional<Authorisable> getNotFinalisedAuthorisationParent(String parentId) {
        return consentJpaRepository.findByExternalId(parentId)
                   .filter(con -> !con.getConsentStatus().isFinalisedStatus())
                   .map(con -> con);
    }

    @Autowired public  AisAuthService(CmsPsuService cmsPsuService, PsuDataMapper psuDataMapper, AspspProfileService aspspProfileService,
                          AuthorisationRepository authorisationRepository,
                          AisConsentConfirmationExpirationService aisConsentConfirmationExpirationService,
                          ConsentJpaRepository aisConsentJpaRepository,
                          AuthorisationMapper authorisationMapper);

}