class ProjectInternationalCorrespondenceAddressController extends AddressLookupBaseController {

    @PostMapping
    public String updateAddress(@PathVariable("projectId") final Long projectId,
                                @Valid @ModelAttribute(FORM_ATTR_NAME) ProjectInternationalCorrespondenceAddressForm form,
                                @SuppressWarnings("unused") BindingResult bindingResult,
                                ValidationHandler validationHandler,
                                Model model) {

        ProjectResource projectResource = projectService.getById(projectId);

        Supplier<String> failureView = () -> viewCurrentAddressForm(model, projectResource);

        return validationHandler.failNowOrSucceedWith(failureView, () ->{
            ServiceResult<Void> updateResult = projectDetailsService.updateAddress(projectId, createAddressResource(form));
            return updateResult.handleSuccessOrFailure(
                    failure -> {
                    validationHandler.addAnyErrors(failure, asGlobalErrors());
                    return viewAddress(projectId, model, form);
                },
                success -> redirectToProjectDetails(projectId));

        });
    }

}