public VoterSet toVoterSet(String controllerListenerName) {
        Map<Integer, VoterSet.VoterNode> voterSetMap = new HashMap<>();
        for (DynamicVoter voter : voters.values()) {
            voterSetMap.put(voter.nodeId(), voter.toVoterNode(controllerListenerName));
        }
        return VoterSet.fromMap(voterSetMap);
    }
@Test
    public void testToVoterSet() {
        Map<Integer, VoterSet.VoterNode> voterMap = new HashMap<>();
        voterMap.put(0, DynamicVoter.parse(
            "0@localhost:8020:K90IZ-0DRNazJ49kCZ1EMQ").toVoterNode("CONTROLLER2"));
        voterMap.put(1, DynamicVoter.parse(
            "1@localhost:8030:aUARLskQTCW4qCZDtS_cwA").toVoterNode("CONTROLLER2"));
        voterMap.put(2, DynamicVoter.parse(
            "2@localhost:8040:2ggvsS4kQb-fSJ_-zC_Ang").toVoterNode("CONTROLLER2"));
        assertEquals(VoterSet.fromMap(voterMap),
            DynamicVoters.parse(
                "0@localhost:8020:K90IZ-0DRNazJ49kCZ1EMQ," +
                "1@localhost:8030:aUARLskQTCW4qCZDtS_cwA," +
                "2@localhost:8040:2ggvsS4kQb-fSJ_-zC_Ang").toVoterSet("CONTROLLER2"));
    }