LeaderInitiator implements SmartLifecycle { @Override public void start() { if (!isRunning()) { LOGGER.debug("Leader initiator starting"); this.leaderRecordWatcher.start(); this.hostPodWatcher.start(); this.scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(); this.scheduledExecutorService.scheduleAtFixedRate(this.leadershipController::update, this.leaderProperties.getUpdatePeriod().toMillis(), this.leaderProperties.getUpdatePeriod().toMillis(), TimeUnit.MILLISECONDS); this.isRunning = true; } } LeaderInitiator(LeaderProperties leaderProperties, LeadershipController leadershipController,
			LeaderRecordWatcher leaderRecordWatcher, PodReadinessWatcher hostPodWatcher); @Override boolean isAutoStartup(); @Override void start(); @Override void stop(); @Override void stop(Runnable callback); @Override boolean isRunning(); @Override int getPhase();  }
@Test public void shouldStartOnlyOnce() { given(this.mockLeaderProperties.getUpdatePeriod()).willReturn(Duration.ofMillis(10000L)); this.leaderInitiator.start(); this.leaderInitiator.start(); verify(this.mockLeaderRecordWatcher).start(); }