@Override
    public Endpoints leaderEndpoints() {
        return localListeners;
    }
@Test
    public void testLeaderEndpoints() {
        VoterSet voters = VoterSetTest.voterSet(Stream.of(localReplicaKey));
        LeaderState<?> state = newLeaderState(voters, 0L);

        assertNotEquals(Endpoints.empty(), state.leaderEndpoints());
        assertEquals(voters.listeners(localReplicaKey.id()), state.leaderEndpoints());
    }