public static ClickHouseNode getClickHouseNode(ClickHouseProtocol protocol, Map<String, String> options) {
        String host = clickhouseServer;
        String url = null;
        int port = protocol.getDefaultPort();
        if (isCloud) {
            host = System.getenv("CLICKHOUSE_CLOUD_HOST");
            port = 8443;
            options.put("password", getPassword());
            url = String.format("https://%s:%d/%s", host, port, database);
        } else if (clickhouseContainer != null) {
            host = clickhouseContainer.getHost();
            port = clickhouseContainer.getMappedPort(port);
            url = String.format("http://%s:%d/default", host, port);//TODO: Should this always be http?
        }
        return ClickHouseNode.of(url, options);
    }
Adaptive ClickHouse server environment for integration test. Two modes are
supported: 1) existing server(when system property {@code clickhouseServer}
is defined); and 2) test container.

<p>
Below system properties can be used for customization:
<ul>
<li>clickhouseServer - host of clickhouse server</li>
<li>clickhouse&lt;Protocol&gt;Port - port of specific protocol, for example:
{@code clickhouseGRPCPort}</li>
<li>clickhouseImage - custom docker image, with or without tag and/or image
digest</li>
<li>clickhouseVersion - version of clickhouse, could be replaced by the one
used in {@code clickhouseImage}</li>
<li>clickhouseTimezone - server timezone</li>
<li>additionalPackages - additional system packages should be installed in
container mode</li>
</ul>
clickhouse-client/src/test/java/com/clickhouse/client/ClickHouseServerForTest.java