### Question:
AccountServiceRemote implements AccountServiceEncrypted { @Override public boolean saveNumberOfTransactions(String consentId, String resourceId, int numberOfTransactions) { try { ResponseEntity<Boolean> response = consentRestTemplate.exchange(accountRemoteUrls.saveNumberOfTransactions(), HttpMethod.PUT, new HttpEntity<>(numberOfTransactions), Boolean.class, consentId, resourceId); return BooleanUtils.isTrue(response.getBody()); } catch (CmsRestException cmsRestException) { log.info("Couldn't save number of transactions to CMS"); } return false; }  @Override boolean saveNumberOfTransactions(String consentId, String resourceId, int numberOfTransactions);  }### Answer:
@Test void saveNumberOfTransactions() { when(accountRemoteUrls.saveNumberOfTransactions()).thenReturn(URL); when(restTemplate.exchange(URL, HttpMethod.PUT, new HttpEntity<>(NUMBER_OF_TRANSACTIONS), Boolean.class, CONSENT_ID, RESOURCE_ID)) .thenReturn(new ResponseEntity<>(true, HttpStatus.OK)); boolean actualResponse = accountServiceRemote.saveNumberOfTransactions(CONSENT_ID, RESOURCE_ID, NUMBER_OF_TRANSACTIONS); assertTrue(actualResponse); }