### Question:
ConfirmationOfFundsAuthorisationValidator { @NotNull public ValidationResult validate(@NotNull String authorisationId, @NotNull PiisConsent consent) { Optional<ConsentAuthorization> authorisationOptional = consent.findAuthorisationInConsent(authorisationId); if (authorisationOptional.isEmpty()) { log.info("Consent ID: [{}], Authorisation ID: [{}]. Authorisation validation has failed: couldn't find authorisation with given authorisationId for consent", consent.getId(), authorisationId); return ValidationResult.invalid(ErrorType.PIIS_403, RESOURCE_UNKNOWN_403); } return ValidationResult.valid(); }  @NotNull ValidationResult validate(@NotNull String authorisationId, @NotNull PiisConsent consent);  }### Answer:
@Test void validate_success() { ValidationResult validationResult = validator.validate(AUTHORISATION_ID, piisConsent); assertTrue(validationResult.isValid()); }
@Test void validate_wrong_authorisationId() { ValidationResult validationResult = validator.validate(WRONG_AUTHORISATION_ID, piisConsent); assertTrue(validationResult.isNotValid()); assertEquals(ErrorType.PIIS_403, validationResult.getMessageError().getErrorType()); assertEquals(RESOURCE_UNKNOWN_403, validationResult.getMessageError().getTppMessage().getMessageErrorCode()); }