@Test
public void testLeaderCanHandleExistingPath() throws Exception {

    CuratorUtils.createPathIfNotExist(curator, zkPaths.getLeaderElectionPath(), true);
    CuratorUtils.createPathIfNotExist(curator, zkPaths.getLeaderAnnouncementPath(), true);
    ZookeeperLeaderElector elector = newZookeeperLeaderElector();
    assertThat(elector.join()).isTrue();
    awaitLeaderActivation();
}