@Test
public void testDeactivate() {

	// Test 1, destroy when cluster link is enabled
	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());
	// Test 2, destory when cluster link is disabled
	clusterMasterExecutorImpl = new ClusterMasterExecutorImpl();
	clusterMasterExecutorImpl.setClusterExecutorImpl(
		new MockClusterExecutor(false));
	clusterMasterExecutorImpl.activate();
	clusterMasterExecutorImpl.deactivate();
}