// Create the master node with a dummy address
ServerName master = new ServerName("localhost", 1,
System.currentTimeMillis());
// Should not have a master yet
DummyMaster dummyMaster = new DummyMaster(zk, master);
ClusterStatusTracker clusterStatusTracker = dummyMaster
.getClusterStatusTracker();
ActiveMasterManager activeMasterManager = dummyMaster
.getActiveMasterManager();
assertFalse(activeMasterManager.clusterHasActiveMaster.get());
// First test becoming the active master uninterrupted
MonitoredTask status = Mockito.mock(MonitoredTask.class);
clusterStatusTracker.setClusterUp();
activeMasterManager.blockUntilBecomingActiveMaster(status,
clusterStatusTracker);
assertTrue(activeMasterManager.clusterHasActiveMaster.get());
assertMaster(zk, master);