code: public static URI getUri(ServiceInstance instance) {
  		String scheme = (instance.isSecure()) ? "https" : "http";
  		String uri = String.format("%s://%s:%s", scheme, instance.getHost(),
  				instance.getPort());
  		return URI.create(uri);
  	}
docs: Creates a URI from the given ServiceInstance's host:port.
  @param instance the ServiceInstance.
  @return URI of the form (secure)?https:http + "host:port".