BranchPresenter implements BranchView.ActionDelegate { @Override public void onBranchUnselected() { selectedBranch = null; view.setEnableCheckoutButton(false); view.setEnableRenameButton(false); view.setEnableDeleteButton(false); } @Inject  BranchPresenter(BranchView view,
                           DtoFactory dtoFactory,
                           EditorAgent editorAgent,
                           GitServiceClient service,
                           GitLocalizationConstant constant,
                           GitOutputPartPresenter console,
                           AppContext appContext,
                           NotificationManager notificationManager,
                           DtoUnmarshallerFactory dtoUnmarshallerFactory,
                           GitOutputPartPresenter gitConsole,
                           WorkspaceAgent workspaceAgent,
                           DialogFactory dialogFactory,
                           ProjectExplorerPresenter projectExplorer,
                           EventBus eventBus); void showBranches(); @Override void onCloseClicked(); @Override void onRenameClicked(); @Override void onDeleteClicked(); @Override void onCheckoutClicked(); @Override void onCreateClicked(); @Override void onBranchUnselected(); @Override void onBranchSelected(@NotNull Branch branch);  }
@Test public void checkoutDeleteRenameButtonsShouldBeDisabled() throws Exception { presenter.onBranchUnselected(); verify(view).setEnableCheckoutButton(eq(DISABLE_BUTTON)); verify(view).setEnableDeleteButton(eq(DISABLE_BUTTON)); verify(view).setEnableRenameButton(eq(DISABLE_BUTTON)); }