### Question:
CmsAspspPiisController implements CmsAspspPiisApi { @Override public ResponseEntity<List<CmsPiisConsent>> getConsentsForPsu(String psuId, String psuIdType, String psuCorporateId, String psuCorporateIdType, String instanceId) { PsuIdData psuIdData = getPsuIdData(psuId, psuIdType, psuCorporateId, psuCorporateIdType); return new ResponseEntity<>(cmsAspspPiisService.getConsentsForPsu(psuIdData, instanceId), HttpStatus.OK); }  @Override ResponseEntity<CreatePiisConsentResponse> createConsent(CreatePiisConsentRequest request, String psuId,
                                                                   String psuIdType, String psuCorporateId, String psuCorporateIdType,
                                                                   String instanceId); @Override ResponseEntity<List<CmsPiisConsent>> getConsentsForPsu(String psuId, String psuIdType, String psuCorporateId, String psuCorporateIdType, String instanceId); @Override ResponseEntity<Boolean> terminateConsent(String consentId, String instanceId);  }### Answer:
@Test void getConsentsForPsu_Success() throws Exception { List<CmsPiisConsent> consents = Collections.singletonList(cmsPiisConsent); when(cmsAspspPiisService.getConsentsForPsu(psuIdData, INSTANCE_ID)) .thenReturn(consents); mockMvc.perform(get(CREATE_PIIS_CONSENT_URL) .contentType(MediaType.APPLICATION_JSON_VALUE) .headers(httpHeaders)) .andExpect(status().is(HttpStatus.OK.value())) .andExpect(content().json(jsonReader.getStringFromFile(LIST_OF_PIIS_CONSENTS_PATH))); verify(cmsAspspPiisService, times(1)).getConsentsForPsu(psuIdData, INSTANCE_ID); }