@Test public void assertHasLeader() { when(jobNodeStorage.isJobNodeExisted("leader/election/instance")).thenReturn(true); assertTrue(leaderService.hasLeader()); }
public boolean hasLeader() { return jobNodeStorage.isJobNodeExisted(LeaderNode.INSTANCE); }
LeaderService { public boolean hasLeader() { return jobNodeStorage.isJobNodeExisted(LeaderNode.INSTANCE); } }
LeaderService { public boolean hasLeader() { return jobNodeStorage.isJobNodeExisted(LeaderNode.INSTANCE); } LeaderService(final CoordinatorRegistryCenter regCenter, final String jobName); }
LeaderService { public boolean hasLeader() { return jobNodeStorage.isJobNodeExisted(LeaderNode.INSTANCE); } LeaderService(final CoordinatorRegistryCenter regCenter, final String jobName); void electLeader(); boolean isLeaderUntilBlock(); boolean isLeader(); boolean hasLeader(); void removeLeader(); }
LeaderService { public boolean hasLeader() { return jobNodeStorage.isJobNodeExisted(LeaderNode.INSTANCE); } LeaderService(final CoordinatorRegistryCenter regCenter, final String jobName); void electLeader(); boolean isLeaderUntilBlock(); boolean isLeader(); boolean hasLeader(); void removeLeader();  }