class ApplicationTeamController {

    @PostMapping(params = "complete")
    public String markAsComplete(@ModelAttribute(value = "form") ApplicationTeamForm form,
                                 BindingResult bindingResult,
                                 ValidationHandler validationHandler,
                                 Model model,
                                 @PathVariable long applicationId,
                                 @PathVariable long questionId,
                                 UserResource user) {
        List<ValidationMessages> validationMessages = questionStatusRestService.markAsComplete(questionId, applicationId, processRoleId(user.getId(), applicationId)).getSuccess();
        validationMessages.forEach(messages -> validationHandler.addAnyErrors(messages,
                mapTeamCompletionError(),
                defaultConverters()));
        return validationHandler.failNowOrSucceedWith(() -> {
                    questionStatusRestService.markAsInComplete(questionId, applicationId, processRoleId(user.getId(), applicationId)).getSuccess();
                    return viewTeam(form, bindingResult, model, applicationId, questionId, user);
                },
                () -> redirectToApplicationTeam(applicationId, questionId));
    }

}