### Question:
PisAuthService extends CmsAuthorisationService<PisCommonPaymentData> { @Override public Optional<Authorisable> getAuthorisationParent(String parentId) { return pisCommonPaymentDataRepository.findByPaymentId(parentId) .map(con -> con); } @Autowired  PisAuthService(CmsPsuService cmsPsuService, PsuDataMapper psuDataMapper, AspspProfileService aspspProfileService,
                          AuthorisationRepository authorisationRepository,
                          PisCommonPaymentConfirmationExpirationService pisCommonPaymentConfirmationExpirationService,
                          PisPaymentDataRepository pisPaymentDataRepository,
                          AuthorisationMapper authorisationMapper, PisCommonPaymentDataRepository pisCommonPaymentDataRepository,
                          PisCommonPaymentMapper pisCommonPaymentMapper, CorePaymentsConvertService corePaymentsConvertService); @Override Optional<Authorisable> getNotFinalisedAuthorisationParent(String parentId); @Override Optional<Authorisable> getAuthorisationParent(String parentId);  }### Answer:
@Test void getAuthorisationParent() { PisCommonPaymentData payment = new PisCommonPaymentData(); when(pisCommonPaymentDataRepository.findByPaymentId(PARENT_ID)).thenReturn(Optional.of(payment)); assertEquals(Optional.of(payment), service.getAuthorisationParent(PARENT_ID)); verify(pisCommonPaymentDataRepository, times(1)).findByPaymentId(PARENT_ID); }