### Question:
CmsPsuConfirmationOfFundsController implements CmsPsuConfirmationOfFundsApi { @Override public ResponseEntity<CmsConfirmationOfFundsConsent> getConsentByConsentId(String consentId, String psuId, String psuIdType, String psuCorporateId, String psuCorporateIdType, String instanceId) { PsuIdData psuIdData = new PsuIdData(psuId, psuIdType, psuCorporateId, psuCorporateIdType, null); return cmsPsuConfirmationOfFundsService.getConsent(psuIdData, consentId, instanceId) .map(consent -> new ResponseEntity<>(consent, HttpStatus.OK)) .orElseGet(() -> new ResponseEntity<>(HttpStatus.NOT_FOUND)); }  @Override ResponseEntity<Object> updateAuthorisationStatus(String consentId, String status, String authorisationId, String psuId, String psuIdType, String psuCorporateId, String psuCorporateIdType, String instanceId, AuthenticationDataHolder authenticationDataHolder); @Override ResponseEntity<CmsConfirmationOfFundsResponse> getConsentByRedirectId(String redirectId, String instanceId); @Override ResponseEntity<Object> updatePsuDataInConsent(String consentId, String authorisationId, String instanceId, PsuIdData psuIdData); @Override ResponseEntity getAuthorisationByAuthorisationId(String authorisationId, String instanceId); @Override ResponseEntity<Void> updateConsentStatus(String consentId, String status, String instanceId); @Override ResponseEntity<CmsConfirmationOfFundsConsent> getConsentByConsentId(String consentId, String psuId, String psuIdType,
                                                                               String psuCorporateId, String psuCorporateIdType,
                                                                               String instanceId);  }### Answer:
@Test void getConsentByConsentId() throws Exception { String cmsConfirmationOfFundsConsentJson = jsonReader.getStringFromFile("json/piis/response/cms-confirmation-of-funds-consent.json"); CmsConfirmationOfFundsConsent cmsConfirmationOfFundsConsent = jsonReader.getObjectFromString(cmsConfirmationOfFundsConsentJson, CmsConfirmationOfFundsConsent.class); when(cmsPsuConfirmationOfFundsService.getConsent(psuIdData, CONSENT_ID, INSTANCE_ID)) .thenReturn(Optional.of(cmsConfirmationOfFundsConsent)); mockMvc.perform(get("/psu-api/v2/piis/consent/{consent-id}", CONSENT_ID) .headers(INSTANCE_ID_HEADERS) .headers(PSU_HEADERS)) .andExpect(status().isOk()) .andExpect(content().json(cmsConfirmationOfFundsConsentJson)); verify(cmsPsuConfirmationOfFundsService).getConsent(psuIdData, CONSENT_ID, INSTANCE_ID); }