FileExplorerPresenter implements GuvnorStructureContextChangeHandler,
                   GuvnorStructureContextBranchChangeHandler { @OnShutdown public void onShutdown() { guvnorStructureContext.removeHandler(changeHandlerRegistration); guvnorStructureContext.removeHandler(branchChangeHandlerRegistration); } FileExplorerPresenter(); @Inject  FileExplorerPresenter(final FileExplorerView view,
                                 final GuvnorStructureContext guvnorStructureContext); @OnStartup void reset(); @OnShutdown void onShutdown(); void loadDirectoryContent(final FileExplorerItem item,
                                     final Path path); @WorkbenchPartView IsWidget getWidget(); @WorkbenchPartTitle String getTitle(); @DefaultPosition Position getDefaultPosition(); void redirect(final Path path); void redirectRepositoryList(); void redirect(final Repository repo); @Override void onNewRepositoryAdded(final Repository repository); @Override void onRepositoryDeleted(final Repository repository); @Override void onBranchChange(final String alias,
                               final String branch); @Override void onNewBranchAdded(String repositoryAlias,
                                 String branchName,
                                 Path branchPath); void onResourceAdded(@Observes final ResourceAddedEvent event); void onResourceDeleted(@Observes final ResourceDeletedEvent event); void onResourceCopied(@Observes final ResourceCopiedEvent event); void onResourceRenamed(@Observes final ResourceRenamedEvent event); void onBatchResourceChange(@Observes final ResourceBatchChangesEvent event); void onSystemRepositoryChanged(@Observes SystemRepositoryChangedEvent event);  }
@Test public void testRemoveHandlers() throws Exception { verify(context, never()).removeHandler(any(GuvnorStructureContextBranchChangeHandler.HandlerRegistration.class)); verify(context, never()).removeHandler(any(GuvnorStructureContextChangeHandler.HandlerRegistration.class)); presenter.onShutdown(); verify(context).removeHandler(branchChangeHandlerRegistration); verify(context).removeHandler(changeHandlerRegistration); }