### Question:
AuthorisationChainResponsibilityService { public AuthorisationProcessorResponse apply(AuthorisationProcessorRequest request) { return receivedAuthorisationProcessor.apply(request); } @Autowired  AuthorisationChainResponsibilityService(ApplicationContext applicationContext); AuthorisationProcessorResponse apply(AuthorisationProcessorRequest request);  }### Answer:
@Test void apply() { Authorisation authorisation = new Authorisation(); AisAuthorisationProcessorRequest request = new AisAuthorisationProcessorRequest(ScaApproach.EMBEDDED, ScaStatus.RECEIVED, new Xs2aUpdatePisCommonPaymentPsuDataRequest(), authorisation); when(applicationContext.getBean(AisAuthorisationProcessorServiceImpl.class)).thenReturn(aisAuthorisationProcessorServiceImpl); AuthorisationProcessorResponse processorResponse = new AuthorisationProcessorResponse(); when(aisAuthorisationProcessorServiceImpl.doScaReceived(request)).thenReturn(processorResponse); doNothing().when(aisAuthorisationProcessorServiceImpl).updateAuthorisation(request, processorResponse); service.apply(request); verify(applicationContext, times(2)).getBean(AisAuthorisationProcessorServiceImpl.class); verify(aisAuthorisationProcessorServiceImpl, times(1)).doScaReceived(request); verify(aisAuthorisationProcessorServiceImpl, times(1)).updateAuthorisation(request, processorResponse); }