### Question:
ConsentValidationService { public ValidationResult validateConsentAuthorisationOnGettingById(AisConsent consent) { return getConsentAuthorisationsValidator.validate(new CommonConsentObject(consent)); }  ValidationResult validateConsentOnCreate(CreateConsentReq request, PsuIdData psuIdData); ValidationResult validateConsentOnGettingStatusById(AisConsent consent); ValidationResult validateConsentOnDelete(AisConsent consent); ValidationResult validateConsentOnGettingById(AisConsent consent); ValidationResult validateConsentAuthorisationOnCreate(CreateConsentAuthorisationObject createConsentAuthorisationObject); ValidationResult validateConsentPsuDataOnUpdate(AisConsent consent, UpdateConsentPsuDataReq request); ValidationResult validateConsentAuthorisationOnGettingById(AisConsent consent); ValidationResult validateConsentAuthorisationScaStatus(AisConsent consent, String authorisationId); Set<TppMessageInformation> buildWarningMessages(CreateConsentReq request);  }### Answer:
@Test void validateConsentAuthorisationOnGettingById() { when(getConsentAuthorisationsValidator.validate(commonConsentObjectCaptor.capture())).thenReturn(ValidationResult.valid()); service.validateConsentAuthorisationOnGettingById(aisConsent); verify(getConsentAuthorisationsValidator).validate(any(CommonConsentObject.class)); assertEquals(aisConsent, commonConsentObjectCaptor.getValue().getAisConsent()); }