private static TaskGroup mockTaskGroup() {
    TaskGroup taskGroup = Mockito.mock(TaskGroup.class);
    MonitoredTask task = Mockito.mock(MonitoredTask.class);
    when(taskGroup.addTask(any())).thenReturn(task);
    return taskGroup;
  }
Assert there is an active master and that it has the specified address.
@param zk              single Zookeeper watcher
@param expectedAddress the expected address of the master
@throws KeeperException unexpected Zookeeper exception
@throws IOException     if an IO problem is encountered
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java