### Question:
CmsConsentController implements CmsConsentApi { @Override public ResponseEntity<Void> findAndTerminateOldConsentsByNewConsentId(String encryptedConsentId) { consentServiceEncrypted.findAndTerminateOldConsentsByNewConsentId(encryptedConsentId); return ResponseEntity.noContent().build(); }  @Override ResponseEntity<Object> createConsent(@RequestBody CmsConsent request); @Override ResponseEntity<CmsConsent> getConsentById(String encryptedConsentId); @Override ResponseEntity<ConsentStatusResponse> getConsentStatusById(String encryptedConsentId); @Override ResponseEntity<Object> updateConsentStatus(String encryptedConsentId, String status); @Override ResponseEntity<Void> findAndTerminateOldConsentsByNewConsentId(String encryptedConsentId); @Override ResponseEntity<Object> updateMultilevelScaRequired(String encryptedConsentId, boolean multilevelSca);  }### Answer:
@Test void findAndTerminateOldConsentsByNewConsentId_Success() throws Exception { when(consentServiceEncrypted.findAndTerminateOldConsentsByNewConsentId(EXTERNAL_ID)).thenReturn(CmsResponse.<Boolean>builder().payload(true).build()); mockMvc.perform(MockMvcRequestBuilders.delete(UriComponentsBuilder.fromPath("/api/v1/consent/{encrypted-consent-id}/old-consents") .buildAndExpand(EXTERNAL_ID) .toUriString()) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().is(HttpStatus.NO_CONTENT.value())); }