class URLFromEnvVarsImpl implements ServiceToURLProvider {
  public static final Logger logger = LoggerFactory.getLogger(URLFromEnvVarsImpl.class);

  public static final String ANNOTATION_EXPOSE_URL = "fabric8.io/exposeUrl";

  @Override
  public String getURL(Service service, String portName, String namespace, KubernetesClient client) {<FILL_FUNCTION_BODY>}

  @Override
  public int getPriority() {
    return ServiceToUrlImplPriority.THIRD.getValue();
  }
}

    String serviceHost = URLFromServiceUtil.resolveHostFromEnvVarOrSystemProperty(service.getMetadata().getName());
    String servicePort = URLFromServiceUtil.resolvePortFromEnvVarOrSystemProperty(service.getMetadata().getName(), "");
    String serviceProtocol = URLFromServiceUtil
        .resolveProtocolFromEnvVarOrSystemProperty(service.getSpec().getPorts().iterator().next().getProtocol(), "");

    if (!serviceHost.isEmpty() && !servicePort.isEmpty() && !serviceProtocol.isEmpty()) {
      return serviceProtocol + "://" + serviceHost + ":" + servicePort;
    } else {
      String answer = getOrCreateAnnotations(service).get(ANNOTATION_EXPOSE_URL);
      if (answer != null && !answer.isEmpty()) {
        return answer;
      }
    }
    return null;
  
<no_super_class>