### Question:
AspspConsentDataPsuApiController implements AspspConsentDataPsuApi { @Override public ResponseEntity<Void> deleteAspspConsentData(String encryptedConsentId) { boolean deleted = aspspDataService.deleteAspspConsentData(encryptedConsentId); if (!deleted) { return ResponseEntity.notFound().build(); } return ResponseEntity.noContent().build(); }  @Override ResponseEntity<CmsAspspConsentDataBase64> getAspspConsentData(String encryptedConsentId); @Override ResponseEntity<Void> updateAspspConsentData(String encryptedConsentId, CmsAspspConsentDataBase64 request); @Override ResponseEntity<Void> deleteAspspConsentData(String encryptedConsentId);  }### Answer:
@Test void deleteAspspConsentData_withValidRequest_shouldReturnNoContent() throws Exception { when(aspspDataService.deleteAspspConsentData(CONSENT_ID)) .thenReturn(true); mockMvc.perform(delete("/psu-api/v1/aspsp-consent-data/consents/{consent-id}", CONSENT_ID)) .andExpect(status().isNoContent()) .andExpect(content().bytes(EMPTY_BODY)); }
@Test void deleteAspspConsentData_withFalseServiceResponse_shouldReturnNotFound() throws Exception { when(aspspDataService.deleteAspspConsentData(CONSENT_ID)) .thenReturn(false); mockMvc.perform(delete("/psu-api/v1/aspsp-consent-data/consents/{consent-id}", CONSENT_ID)) .andExpect(status().isNotFound()) .andExpect(content().bytes(EMPTY_BODY)); }