### Question:
DkbPaymentInitiationService extends BasePaymentInitiationService { Map<String, String> addBearerHeader(Map<String, String> map) { map.put("Authorization", "Bearer " + accessService.retrieveToken()); return map; } DkbPaymentInitiationService(Aspsp aspsp,
                                       AccessTokenService accessService,
                                       HttpClient httpClient,
                                       LinksRewriter linksRewriter); @Override Response<PaymentInitationRequestResponse201> initiatePayment(PaymentService paymentService,
                                                                        PaymentProduct paymentProduct,
                                                                        RequestHeaders requestHeaders,
                                                                        RequestParams requestParams,
                                                                        Object body); @Override Response<StartScaprocessResponse> startPaymentAuthorisation(PaymentService paymentService,
                                                                       PaymentProduct paymentProduct,
                                                                       String paymentId,
                                                                       RequestHeaders requestHeaders,
                                                                       RequestParams requestParams,
                                                                       UpdatePsuAuthentication updatePsuAuthentication); @Override Response<UpdatePsuAuthenticationResponse> updatePaymentPsuData(PaymentService paymentService,
                                                                          PaymentProduct paymentProduct,
                                                                          String paymentId,
                                                                          String authorisationId,
                                                                          RequestHeaders requestHeaders,
                                                                          RequestParams requestParams,
                                                                          UpdatePsuAuthentication updatePsuAuthentication); @Override Response<SelectPsuAuthenticationMethodResponse> updatePaymentPsuData(PaymentService paymentService,
                                                                                PaymentProduct paymentProduct,
                                                                                String paymentId,
                                                                                String authorisationId,
                                                                                RequestHeaders requestHeaders,
                                                                                RequestParams requestParams,
                                                                                SelectPsuAuthenticationMethod selectPsuAuthenticationMethod);  }### Answer:
@Test void addBearerHeader() { when(accessService.retrieveToken()).thenReturn("token"); Map<String, String> headers = service.addBearerHeader(new HashMap<>()); verify(accessService, times(1)).retrieveToken(); assertThat(headers) .hasSize(1) .containsKey("Authorization"); assertThat(headers.get("Authorization")).isNotNull(); }