RepositoriesPresenter implements GuvnorStructureContextChangeHandler { @OnShutdown public void shutdown() { guvnorStructureContext.removeHandler(changeHandlerRegistration); } RepositoriesPresenter(); @Inject  RepositoriesPresenter(final RepositoriesView view,
                                 final GuvnorStructureContext guvnorStructureContext); @OnStartup void onStartup(); @OnShutdown void shutdown(); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsWidget getView(); @Override void onNewRepositoryAdded(final Repository repository); @Override void onNewBranchAdded(String repositoryAlias,
                                 String branchName,
                                 Path branchPath); @Override void onRepositoryDeleted(final Repository repository); void onSystemRepositoryChanged(@Observes final SystemRepositoryChangedEvent event);  }
@Test public void testRemoveHandlers() throws Exception { assertTrue(removedChangeHandlerRegistration == null); presenter.shutdown(); assertTrue(changeHandlerRegistration == removedChangeHandlerRegistration); }