class GrantAgreementController {

    @PostMapping(params = "complete")
    public String markAsComplete(@ModelAttribute(name = MODEL_ATTRIBUTE_FORM) GrantAgreementForm form,
                                 @SuppressWarnings("unused") BindingResult bindingResult,
                                 Model model,
                                 @PathVariable long applicationId,
                                 @PathVariable long questionId,
                                 UserResource user) {
        if (euGrantTransferRestService.findGrantAgreement(applicationId).isFailure()) {
            bindingResult.rejectValue("grantAgreement", "validation.field.must.not.be.blank");
            return viewGrantAgreement(form, bindingResult, model, applicationId, questionId, user);
        }
        ProcessRoleResource role = userRestService.findProcessRole(user.getId(), applicationId).getSuccess();
        questionStatusRestService.markAsComplete(questionId, applicationId, role.getId()).getSuccess();
        return String.format("redirect:/application/%d/form/question/%d/grant-agreement", applicationId, questionId);
    }

    public  GrantAgreementController(GrantAgreementViewModelPopulator grantAgreementViewModelPopulator, EuGrantTransferRestService euGrantTransferRestService, QuestionStatusRestService questionStatusRestService, UserRestService userRestService);

}