class FundController {

    @PostMapping("/_search")
    @ResponseBody
    @ResponseStatus(HttpStatus.OK)
    public FundResponse search(@ModelAttribute FundSearchContract fundSearchContract, @RequestBody RequestInfo requestInfo,
            BindingResult errors,@RequestParam String tenantId) {
    	
    	System.out.println("requestInfo in FundController Search "+requestInfo.toString());
    	System.out.println("requestInfo in FundController Search "+requestInfo.getAuthToken());
    	ModelMapper mapper = new ModelMapper();
        FundSearch domain = new FundSearch();
        mapper.map(fundSearchContract, domain);
        FundContract contract;
        ModelMapper model = new ModelMapper();
        List<FundContract> fundContracts = new ArrayList<>();
        Pagination<Fund> funds = fundService.search(domain, errors);

        if (funds.getPagedData() != null) {
            for (Fund fund : funds.getPagedData()) {
                contract = new FundContract();
                model.map(fund, contract);
                fundContracts.add(contract);
            }
        }

        FundResponse response = new FundResponse();
        response.setFunds(fundContracts);
        response.setPage(new PaginationContract(funds));
        response.setResponseInfo(getResponseInfo(requestInfo));

        return response;

    }

}