### Question:
CmsAccountController implements CmsAccountApi { @Override public ResponseEntity<Boolean> saveNumberOfTransactions(String encryptedConsentId, String resourceId, Integer numberOfTransactions) { return accountServiceEncrypted.saveNumberOfTransactions(encryptedConsentId, resourceId, numberOfTransactions) ? new ResponseEntity<>(true, HttpStatus.OK) : new ResponseEntity<>(HttpStatus.NOT_FOUND); }  @Override ResponseEntity<Boolean> saveNumberOfTransactions(String encryptedConsentId, String resourceId, Integer numberOfTransactions);  }### Answer:
@Test void saveNumberOfTransactions_Success() throws Exception { when(accountServiceEncrypted.saveNumberOfTransactions(ENCRYPTED_CONSENT_ID, RESOURCE_ID, NUMBER_OF_TRANSACTIONS)) .thenReturn(true); mockMvc.perform(MockMvcRequestBuilders.put(SAVE_NUMBER_OF_TRANSACTIONS) .contentType(MediaType.APPLICATION_JSON_VALUE) .content(JSON_READER.writeValueAsString(NUMBER_OF_TRANSACTIONS))) .andExpect(status().isOk()); }
@Test void saveNumberOfTransactions_ConsentNotFound() throws Exception { when(accountServiceEncrypted.saveNumberOfTransactions(ENCRYPTED_CONSENT_ID, RESOURCE_ID, NUMBER_OF_TRANSACTIONS)) .thenReturn(false); mockMvc.perform(MockMvcRequestBuilders.put(SAVE_NUMBER_OF_TRANSACTIONS) .contentType(MediaType.APPLICATION_JSON_VALUE) .content(JSON_READER.writeValueAsString(NUMBER_OF_TRANSACTIONS))) .andExpect(status().isNotFound()); }