class ByProjectFinanceCostCategorySummaryStrategy implements SpendProfileCostCategorySummaryStrategy {

    @Override
    public ServiceResult<SpendProfileCostCategorySummaries> getCostCategorySummaries(Long projectId, Long organisationId) {

        return projectService.getProjectById(projectId).andOnSuccess(project ->
               organisationService.findById(organisationId).andOnSuccess(organisation ->
               projectFinanceService.financeChecksDetails(project.getId(), organisationId).andOnSuccess(finances ->
               createCostCategorySummariesWithCostCategoryType(projectId, organisationId, project, organisation, finances))));
    }

}