### Question:
SinglePaymentSpiImpl extends AbstractPaymentSpi<SpiSinglePayment, SpiSinglePaymentInitiationResponse> implements SinglePaymentSpi { @Override public @NotNull SpiResponse<SpiSinglePayment> getPaymentById(@NotNull SpiContextData contextData, @NotNull String acceptMediaType, @NotNull SpiSinglePayment payment, @NotNull SpiAspspConsentDataProvider aspspConsentDataProvider) { payment.setDebtorName(DEBTOR_NAME); return paymentService.getPaymentById(payment, aspspConsentDataProvider, paymentMapper::toSpiSinglePayment); } @Autowired  SinglePaymentSpiImpl(GeneralPaymentService paymentService, LedgersSpiPaymentMapper paymentMapper); @Override @NotNull SpiResponse<SpiSinglePayment> getPaymentById(@NotNull SpiContextData contextData,
                                                                 @NotNull String acceptMediaType,
                                                                 @NotNull SpiSinglePayment payment,
                                                                 @NotNull SpiAspspConsentDataProvider aspspConsentDataProvider); @Override @NotNull SpiResponse<SpiPaymentConfirmationCodeValidationResponse> notifyConfirmationCodeValidation(@NotNull SpiContextData spiContextData, boolean confirmationCodeValidationResult, @NotNull SpiSinglePayment payment, boolean isCancellation, @NotNull SpiAspspConsentDataProvider spiAspspConsentDataProvider);  }### Answer:
@Test void getPaymentById() { when(paymentService.getPaymentById(eq(payment), eq(spiAspspConsentDataProvider), any())) .thenReturn(SpiResponse.<SpiSinglePayment>builder() .payload(new SpiSinglePayment(PAYMENT_PRODUCT)) .build()); paymentSpi.getPaymentById(SPI_CONTEXT_DATA, JSON_ACCEPT_MEDIA_TYPE, payment, spiAspspConsentDataProvider); verify(paymentService, times(1)).getPaymentById(eq(payment), eq(spiAspspConsentDataProvider), any()); }