class ApplicationTeamAddressController {

    @PostMapping
    public String updateAddress(@Valid @ModelAttribute(value = "form") ApplicationTeamAddressForm form,
                                BindingResult bindingResult,
                                ValidationHandler validationHandler,
                                Model model,
                                @PathVariable long applicationId,
                                @PathVariable long questionId,
                                @PathVariable long organisationId) {
        Supplier<String> failureView = () -> getAddressView(model, applicationId, organisationId, questionId);
        return validationHandler.failNowOrSucceedWith(failureView, () -> {
            validationHandler.addAnyErrors(applicationOrganisationAddressRestService.updateAddress(applicationId, organisationId, INTERNATIONAL, form.toAddress()));
            return validationHandler.failNowOrSucceedWith(failureView,
                    () -> redirectToApplicationTeam(applicationId, questionId));
        });
    }

}