class InstrumentController {

    @PostMapping("/_search")
    @ResponseBody
    @ResponseStatus(HttpStatus.OK)
    public InstrumentResponse search(@ModelAttribute InstrumentSearchContract instrumentSearchContract,
            RequestInfo requestInfo, BindingResult errors) {

        InstrumentMapper mapper = new InstrumentMapper();
        InstrumentSearch domain = mapper.toSearchDomain(instrumentSearchContract);
        InstrumentContract contract;
        List<InstrumentContract> instrumentContracts = new ArrayList<>();
        Pagination<Instrument> instruments = instrumentService.search(domain);

        if (instruments.getPagedData() != null)
            for (Instrument instrument : instruments.getPagedData()) {
                contract = mapper.toContract(instrument);
                instrumentContracts.add(contract);
            }

        InstrumentResponse response = new InstrumentResponse();
        response.setInstruments(instrumentContracts);
        response.setPage(new PaginationContract(instruments));
        response.setResponseInfo(getResponseInfo(requestInfo));

        return response;

    }

}