@Override
    public void prepare() throws ServiceNotProvidedException, ModuleStartException {
        try {
            List<Address> addressList = ConnectUtils.parse(config.getHostPort());

            List<HostAndPort> hostAndPorts = new ArrayList<>();
            for (Address address : addressList) {
                hostAndPorts.add(HostAndPort.fromParts(address.getHost(), address.getPort()));
            }

            Consul.Builder consulBuilder = Consul.builder()
                                                 //                    we should set this value or it will be blocked forever
                                                 .withConnectTimeoutMillis(3000);

            if (StringUtils.isNotEmpty(config.getAclToken())) {
                consulBuilder.withAclToken(config.getAclToken());
            }

            if (hostAndPorts.size() > 1) {
                client = consulBuilder.withMultipleHostAndPort(hostAndPorts, 5000).build();
            } else {
                client = consulBuilder.withHostAndPort(hostAndPorts.get(0)).build();
            }
        } catch (ConnectStringParseException | ConsulException e) {
            throw new ModuleStartException(e.getMessage(), e);
        }
        ConsulCoordinator coordinator = new ConsulCoordinator(getManager(), config, client);
        this.registerServiceImplementation(ClusterRegister.class, coordinator);
        this.registerServiceImplementation(ClusterNodesQuery.class, coordinator);
        this.registerServiceImplementation(ClusterCoordinator.class, coordinator);
    }
@Test
    public void prepareWithNonHost() throws Exception {
        assertThrows(ModuleStartException.class, () -> provider.prepare());
    }