class AddBranchPopUpPresenter {

    public void add() {
        final String name = view.getName();
        final String branchFrom = view.getBranchFrom();

        beginBranchCreation();
        validateFields(name,
                       () -> libraryService.call(v -> {
                           endBranchCreation();
                           notifySuccess();
                           view.hide();
                       }, getErrorCallback()).addBranch(name,
                                                        branchFrom,
                                                        project));
    }

    @Inject public  AddBranchPopUpPresenter(final Caller<LibraryService> libraryService,
                                   final BusyIndicatorView busyIndicatorView,
                                   final Event<NotificationEvent> notificationEvent,
                                   final LibraryPlaces libraryPlaces,
                                   final View view,
                                   final Caller<ValidationService> validationService);

}