class ValidationResultMapper {

    public ValidationResult mapToValidationResult(de.adorsys.psd2.xs2a.service.validator.ValidationResult xs2aValidationResult) {
        if (xs2aValidationResult.isValid()) {
            return ValidationResult.valid();
        }

        return ValidationResult.invalid(xs2aValidationResult.getMessageError());
    }

}