class TransactionReportAcceptHeaderValidator {

    public ValidationResult validate(String acceptHeader) {
        if (StringUtils.isNotBlank(acceptHeader)) {
            List<String> supportedTransactionApplicationTypes = aspspProfileServiceWrapper.getSupportedTransactionApplicationTypes();

            if (!isAtLeastOneAcceptHeaderSupported(supportedTransactionApplicationTypes, acceptHeader)) {
                return ValidationResult.invalid(ErrorType.AIS_406, REQUESTED_FORMATS_INVALID);
            }
        }

        return ValidationResult.valid();
    }

}