class FinanceFormPopulator implements CompetitionSetupSubsectionFormPopulator {

    @Override
    public CompetitionSetupForm populateForm(CompetitionResource competitionResource, Optional<Long> objectId) {
        FinanceForm competitionSetupForm = new FinanceForm();

        CompetitionSetupFinanceResource competitionSetupFinanceResource = competitionSetupFinanceRestService
                .getByCompetitionId(competitionResource.getId()).getSuccess();

        competitionSetupForm.setApplicationFinanceType(competitionSetupFinanceResource.getApplicationFinanceType());
        competitionSetupForm.setIncludeGrowthTable(competitionResource.isKtp() ? Boolean.FALSE : competitionSetupFinanceResource.getIncludeGrowthTable());
        competitionSetupForm.setIncludeYourOrganisationSection(competitionSetupFinanceResource.getIncludeYourOrganisationSection());
        competitionSetupForm.setIncludeJesForm(competitionSetupFinanceResource.getIncludeJesForm());

        if (competitionResource.isFinanceType()) {
            competitionSetupForm.setFundingRules(getFundingRulesWithoutHeading(competitionResource.getId()));
        }

        boolean financesRequired = !competitionResource.isNonFinanceType();

        competitionSetupForm.setGrowthTableRequired(competitionResource.isKtp() ? false : financesRequired);
        competitionSetupForm.setFinancesRequired(financesRequired);

        return competitionSetupForm;
    }

    public  FinanceFormPopulator(CompetitionSetupFinanceRestService competitionSetupFinanceRestService,
                                SectionService sectionService,
                                QuestionRestService questionRestService);

}