### Question:
RestExecutionService { public void updateLedgers(DataPayload payload) { if (!payload.isValidPayload()) { throw new TppException("Payload data is invalid", 400); } dataRestClient.uploadData(initialiseDataSets(payload)); }  void updateLedgers(DataPayload payload); @SuppressWarnings("PMD:PrematureDeclaration") void revert(RevertRequestTO revertRequest);  }### Answer:
@Test void updateLedgers() { when(paymentTOMapper.getMapper()).thenReturn(new ObjectMapper().registerModule(new JavaTimeModule())); when(paymentTOMapper.toAbstractPayment(any(), any(), any())).thenReturn(getPaymentTO()); when(balanceMapper.toAccountBalanceTO(any())).thenReturn(getAccountBalanceTO()); executionService.updateLedgers(getPayload(getSinglePmt())); verify(balanceMapper, times(1)).toAccountBalanceTO(new AccountBalance()); }