class ProjectFormPopulator extends AbstractFormInputQuestionFormPopulator implements CompetitionSetupSubsectionFormPopulator {

    @Override
    public CompetitionSetupForm populateForm(CompetitionResource competitionResource, Optional<Long> objectId) {

        ProjectForm competitionSetupForm = new ProjectForm();

        if (objectId.isPresent()) {
            CompetitionSetupQuestionResource questionResource = questionSetupCompetitionRestService
                    .getByQuestionId(objectId.get()).getSuccess();
            competitionSetupForm.setQuestion(questionResource);
            competitionSetupForm.setRemovable(true);
            populateCommon(questionResource, competitionSetupForm);
        } else {
            throw new ObjectNotFoundException();
        }

        return competitionSetupForm;
    }

}