public static URI toUri(String endpoint, ClientConfiguration config) {

        if (config == null) {
            throw new IllegalArgumentException("ClientConfiguration cannot be null");
        }
        return toUri(endpoint, config.getProtocol());
    }
public static URI toUri ( String endpoint , ClientConfiguration config ) { if ( config == null ) { throw new IllegalArgumentException ( "ClientConfiguration cannot be null" ) ; } return toUri ( endpoint , config . getProtocol ( ) ) ; }
Returns an URI for the given endpoint.
Prefixes the protocol if the endpoint given does not have it.

@throws IllegalArgumentException if the inputs are null.