### Question:
AmountValidator { public void validateAmount(String amount, MessageError messageError) { if (amount == null) { errorBuildingService.enrichMessageError(messageError, TppMessageInformation.of(FORMAT_ERROR_NULL_VALUE, AMOUNT_STRING)); } else if (StringUtils.isBlank(amount)) { errorBuildingService.enrichMessageError(messageError, TppMessageInformation.of(FORMAT_ERROR_EMPTY_FIELD, AMOUNT_STRING)); } else if (!Pattern.matches(CORRECT_AMOUNT_REGEX, amount)) { errorBuildingService.enrichMessageError(messageError, TppMessageInformation.of(FORMAT_ERROR_WRONG_FORMAT_VALUE, AMOUNT_STRING)); } }  void validateAmount(String amount, MessageError messageError);  }### Answer:
@Test void doValidation_success() { validator.validateAmount(CORRECT_AMOUNT, messageError); assertTrue(messageError.getTppMessages().isEmpty()); }
@Test void doValidation_wrong_1() { validator.validateAmount(WRONG_AMOUNT_1, messageError); assertThatErrorIs(FORMAT_ERROR_WRONG_FORMAT_VALUE, "amount"); }
@Test void doValidation_wrong_2() { validator.validateAmount(WRONG_AMOUNT_2, messageError); assertThatErrorIs(FORMAT_ERROR_WRONG_FORMAT_VALUE, "amount"); }
@Test void doValidation_wrong_3() { validator.validateAmount(WRONG_AMOUNT_3, messageError); assertThatErrorIs(FORMAT_ERROR_WRONG_FORMAT_VALUE, "amount"); }
@Test void doValidation_wrong_4() { validator.validateAmount(WRONG_AMOUNT_4, messageError); assertThatErrorIs(FORMAT_ERROR_WRONG_FORMAT_VALUE, "amount"); }
@Test void doValidation_wrong_5() { validator.validateAmount(WRONG_AMOUNT_5, messageError); assertThatErrorIs(FORMAT_ERROR_WRONG_FORMAT_VALUE, "amount"); }
@Test void doValidation_empty() { validator.validateAmount("", messageError); assertThatErrorIs(FORMAT_ERROR_EMPTY_FIELD, "amount"); }
@Test void doValidation_null() { validator.validateAmount(null, messageError); assertThatErrorIs(FORMAT_ERROR_NULL_VALUE, "amount"); }