class TransactionStatusAcceptHeaderValidator {

    public ValidationResult validate(@NotNull String acceptHeader) {
        if (acceptHeader.equalsIgnoreCase(MediaType.ALL_VALUE)) {
            return ValidationResult.valid();
        }

        List<String> supportedTransactionStatusFormats = aspspProfileServiceWrapper.getSupportedTransactionStatusFormats();
        if (!isMediaTypeSupported(acceptHeader, supportedTransactionStatusFormats)) {
            return ValidationResult.invalid(ErrorType.PIS_406, REQUESTED_FORMATS_INVALID);
        }

        return ValidationResult.valid();
    }

}