ClusterMasterExecutorImpl implements ClusterMasterExecutor { @Deactivate protected void deactivate() { if (_clusterEventListener != null) { _clusterExecutorImpl.removeClusterEventListener( _clusterEventListener); } _clusterEventListener = null; _enabled = false; _localClusterNodeId = null; }  @Override void addClusterMasterTokenTransitionListener(
		ClusterMasterTokenTransitionListener
			clusterMasterTokenTransitionListener); @Override NoticeableFuture<T> executeOnMaster(
		MethodHandler methodHandler); @Override boolean isEnabled(); @Override boolean isMaster(); @Override void removeClusterMasterTokenTransitionListener(
		ClusterMasterTokenTransitionListener
			clusterMasterTokenTransitionListener);  }
@Test public void testDeactivate() { ClusterMasterExecutorImpl clusterMasterExecutorImpl = new ClusterMasterExecutorImpl(); MockClusterExecutor mockClusterExecutor = new MockClusterExecutor(true); clusterMasterExecutorImpl.setClusterExecutorImpl(mockClusterExecutor); clusterMasterExecutorImpl.activate(); List<ClusterEventListener> clusterEventListeners = mockClusterExecutor.getClusterEventListeners(); Assert.assertEquals( clusterEventListeners.toString(), 1, clusterEventListeners.size()); clusterMasterExecutorImpl.deactivate(); Assert.assertTrue( clusterEventListeners.toString(), clusterEventListeners.isEmpty()); clusterMasterExecutorImpl = new ClusterMasterExecutorImpl(); clusterMasterExecutorImpl.setClusterExecutorImpl( new MockClusterExecutor(false)); clusterMasterExecutorImpl.activate(); clusterMasterExecutorImpl.deactivate(); }