class GrantAgreementReadOnlyPopulator implements QuestionReadOnlyViewModelPopulator<GrantAgreementReadOnlyViewModel> {

    @Override
    public GrantAgreementReadOnlyViewModel populate(CompetitionResource competition, QuestionResource question, ApplicationReadOnlyData data, ApplicationReadOnlySettings settings) {
        Optional<FileEntryResource> grantAgreement = grantTransferRestService.findGrantAgreement(data.getApplication().getId()).getOptionalSuccessObject();

        return new GrantAgreementReadOnlyViewModel(data, question,
                grantAgreement.map(FileEntryResource::getName).orElse(null));
    }

    public  GrantAgreementReadOnlyPopulator(EuGrantTransferRestService grantTransferRestService);

}