class CmsPsuPiisController implements CmsPsuPiisApi {

    @Override
    public ResponseEntity<CmsPiisConsent> getConsent(String consentId, String psuId, String psuIdType, String psuCorporateId, String psuCorporateIdType, String instanceId) {
        PsuIdData psuIdData = new PsuIdData(psuId, psuIdType, psuCorporateId, psuCorporateIdType, null);
        return cmsPsuPiisService.getConsent(psuIdData, consentId, instanceId)
                   .map(con -> new ResponseEntity<>(con, HttpStatus.OK))
                   .orElseGet(() -> new ResponseEntity<>(HttpStatus.NOT_FOUND));
    }

}