### Question:
AisAuthService extends CmsAuthorisationService<ConsentEntity> { @Override public Optional<Authorisable> getAuthorisationParent(String parentId) { return consentJpaRepository.findByExternalId(parentId) .map(con -> con); } @Autowired  AisAuthService(CmsPsuService cmsPsuService, PsuDataMapper psuDataMapper, AspspProfileService aspspProfileService,
                          AuthorisationRepository authorisationRepository,
                          AisConsentConfirmationExpirationService aisConsentConfirmationExpirationService,
                          ConsentJpaRepository aisConsentJpaRepository,
                          AuthorisationMapper authorisationMapper); @Override Optional<Authorisable> getNotFinalisedAuthorisationParent(String parentId); @Override Optional<Authorisable> getAuthorisationParent(String parentId);  }### Answer:
@Test void getAuthorisationParent() { when(consentJpaRepository.findByExternalId(PARENT_ID)) .thenReturn(Optional.of(consentEntity)); assertEquals(Optional.of(consentEntity), service.getAuthorisationParent(PARENT_ID)); verify(consentJpaRepository, times(1)).findByExternalId(PARENT_ID); }