### Question:
BulkPaymentTypeValidatorImpl extends SinglePaymentTypeValidatorImpl { @Override public MessageError validate(Object body, MessageError messageError, PaymentValidationConfig validationConfig) { try { doBulkValidation(paymentMapper.mapToBulkPayment(body), messageError, validationConfig); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith("Unrecognized field")) { errorBuildingService.enrichMessageError(messageError, TppMessageInformation.of(MessageErrorCode.FORMAT_ERROR_EXTRA_FIELD, extractErrorField(e.getMessage()))); } else { errorBuildingService.enrichMessageError(messageError, TppMessageInformation.of(MessageErrorCode.FORMAT_ERROR)); } } return messageError; } @Autowired  BulkPaymentTypeValidatorImpl(ErrorBuildingService errorBuildingService, Xs2aObjectMapper xs2aObjectMapper,
                                        PaymentMapper paymentMapper, AmountValidator amountValidator,
                                        IbanValidator ibanValidator); @Override PaymentType getPaymentType(); @Override MessageError validate(Object body, MessageError messageError, PaymentValidationConfig validationConfig);  }### Answer:
@Test void doValidation_success() { validator.validate(BULK_PAYMENT_INITIATION_JSON, messageError, validationConfig); assertTrue(messageError.getTppMessages().isEmpty()); }
@Test void doValidation_IllegalArgumentException() { Object body = new Object(); validator.validate(body, messageError, validationConfig); assertEquals(MessageErrorCode.FORMAT_ERROR, messageError.getTppMessage().getMessageErrorCode()); }
@Test void doValidation_IllegalArgumentException_extraField() { PeriodicPayment body = new PeriodicPayment(); validator.validate(body, messageError, validationConfig); assertEquals(MessageErrorCode.FORMAT_ERROR_EXTRA_FIELD, messageError.getTppMessage().getMessageErrorCode()); assertArrayEquals(new Object[]{"paymentId"}, messageError.getTppMessage().getTextParameters()); }