public VoterSet.VoterNode toVoterNode(String controllerListenerName) {
        ReplicaKey voterKey = ReplicaKey.of(nodeId, directoryId);
        Endpoints listeners = Endpoints.fromInetSocketAddresses(Collections.singletonMap(
                ListenerName.normalised(controllerListenerName),
                new InetSocketAddress(host, port)));
        SupportedVersionRange supportedKRaftVersion =
                new SupportedVersionRange((short) 0, (short) 1);
        return VoterSet.VoterNode.of(voterKey, listeners, supportedKRaftVersion);
    }
@Test
    public void testToVoterNode() {
        ReplicaKey voterKey = ReplicaKey.of(5, Uuid.fromString("__0IZ-0DRNazJ49kCZ1EMQ"));
        Endpoints listeners = Endpoints.fromInetSocketAddresses(Collections.singletonMap(
            new ListenerName("CONTROLLER"),
            new InetSocketAddress("localhost", 8020)));
        SupportedVersionRange supportedKRaftVersion =
            new SupportedVersionRange((short) 0, (short) 1);
        assertEquals(VoterSet.VoterNode.of(voterKey, listeners, supportedKRaftVersion),
            DynamicVoter.parse("5@localhost:8020:__0IZ-0DRNazJ49kCZ1EMQ").
                toVoterNode("CONTROLLER"));
    }