class CostTotalController {

    @PostMapping("/cost-totals")
    public RestResult<Void> addCostTotals(@NotNull @RequestBody List<FinanceCostTotalResource>
                                                  financeCostTotalResources) {
        LOG.debug("Initiating addCostTotals for financeIds: {}",
                financeCostTotalResources.stream().map(financeCostTotalResource ->
                        String.valueOf(financeCostTotalResource.getFinanceId()))
                        .collect(Collectors.joining(", ")));

        return costTotalService.saveCostTotals(financeCostTotalResources).toPostCreateResponse();
    }

    @Autowired public  CostTotalController(CostTotalService costTotalService);

}