class InstrumentController {

    @PostMapping("/_update")
    @ResponseStatus(HttpStatus.CREATED)
    public InstrumentResponse update(@RequestBody InstrumentRequest instrumentRequest, BindingResult errors) {

        InstrumentMapper mapper = new InstrumentMapper();
        instrumentRequest.getRequestInfo().setAction(ACTION_UPDATE);
        InstrumentResponse instrumentResponse = new InstrumentResponse();
        List<Instrument> instruments = new ArrayList<>();
        instrumentResponse.setResponseInfo(getResponseInfo(instrumentRequest.getRequestInfo()));
        Instrument instrument;
        InstrumentContract contract;
        List<InstrumentContract> instrumentContracts = new ArrayList<>();

        for (InstrumentContract instrumentContract : instrumentRequest.getInstruments()) {
            instrument = mapper.toDomain(instrumentContract);
            instrument.setLastModifiedBy(instrumentRequest.getRequestInfo().getUserInfo());
            instrument.setLastModifiedDate(new Date());
            instruments.add(instrument);
        }

        instruments = instrumentService.update(instruments, errors, instrumentRequest.getRequestInfo());

        for (Instrument i : instruments) {
            contract = mapper.toContract(i);
            instrumentContracts.add(contract);
        }

        instrumentResponse.setInstruments(instrumentContracts);

        return instrumentResponse;
    }

}