class ConsentIdHeaderCofValidatorImpl extends AbstractHeaderValidatorImpl implements FundsConfirmationHeaderValidator {

    @Override
    protected ValidationResult validate(Map<String, String> headers) {
        PiisConsentSupported piisConsentSupported = profileService.getPiisConsentSupported();
        if (piisConsentSupported == PiisConsentSupported.TPP_CONSENT_SUPPORTED) {
            return checkIfHeaderIsPresented(headers);
        }
        return ValidationResult.valid();
    }

    @Autowired  ConsentIdHeaderCofValidatorImpl(ErrorBuildingService errorBuildingService, AspspProfileServiceWrapper profileService);

}