### Question:
FullTraversalConnector implements IndexingConnector, IncrementalChangeHandler { @Override public void destroy() { repository.close(); repositoryContext.getEventBus().unregister(this); if (listeningExecutorService != null) { logger.log(Level.INFO, "Shutting down the full traversal connector executor"); MoreExecutors.shutdownAndAwaitTermination(listeningExecutorService, 5L, TimeUnit.MINUTES); } } FullTraversalConnector(Repository repository);  FullTraversalConnector(Repository repository, CheckpointHandler checkpointHandler); @Override String getDefaultId(); @Override void init(IndexingConnectorContext context); @Override void traverse(); @Subscribe synchronized void handleAsyncOperation(AsyncApiOperation asyncOp); @Override void saveCheckpoint(boolean isShutdown); @Override void destroy(); @Override synchronized void handleIncrementalChanges(); static final String NUM_THREADS; static final String TRAVERSE_USE_QUEUES; static final String TRAVERSE_PARTITION_SIZE; static final String TRAVERSE_QUEUE_TAG; static final String CHECKPOINT_FULL; static final String CHECKPOINT_INCREMENTAL; static final String CHECKPOINT_QUEUE; static final String QUEUE_NAME; }### Answer:
@Test public void testDestroy() throws Exception { setupConfig.initConfig(new Properties()); FullTraversalConnector connector = new FullTraversalConnector(repositoryMock, checkpointHandlerMock); connector.init(connectorContextMock); connector.destroy(); verify(repositoryMock).close(); verify(repositoryMock).init(repositoryContextCaptor.capture()); RepositoryContext rc = repositoryContextCaptor.getAllValues().get(0); thrown.expect(IllegalArgumentException.class); rc.getEventBus().unregister(connector); }