class CmsPsuPisController implements CmsPsuPisApi {

    @Override
    public ResponseEntity<CmsPsuAuthorisation> getAuthorisationByAuthorisationId(String authorisationId, String instanceId) {
        return cmsPsuPisService.getAuthorisationByAuthorisationId(authorisationId, instanceId)
            .map(payment -> new ResponseEntity<>(payment, HttpStatus.OK))
            .orElseGet(() -> new ResponseEntity<>(HttpStatus.BAD_REQUEST));
    }

}