@Test
public void testGetControllerLeader() throws Exception {

  String host = "somehost";
  int port = 9090;
  String json = String.format("{\"id\": \"%s_%d\"}", host, port);
  when(zk.getData(eq("/" + CLUSTER_NAME + "/CONTROLLER/LEADER"),
      anyBoolean(), any(Stat.class))).thenReturn(json.getBytes());
  InetSocketAddress address = zkManager.getControllerLeader();
  assertEquals(host, address.getHostName());
  assertEquals(port, address.getPort());
}