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

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

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

}

    String serviceName = service.getMetadata().getName();
    ServicePort port = URLFromServiceUtil.getServicePortByName(service, portName);
    if (port != null && port.getName() != null && client.isAdaptable(OpenShiftClient.class)) {
      try {
        String serviceProtocol = port.getProtocol();
        OpenShiftClient openShiftClient = client.adapt(OpenShiftClient.class);
        Route route = openShiftClient.routes().inNamespace(namespace).withName(service.getMetadata().getName()).get();
        if (route != null) {
          return (serviceProtocol + "://" + route.getSpec().getHost()).toLowerCase(Locale.ROOT);
        }
      } catch (KubernetesClientException e) {
        if (e.getCode() == HttpURLConnection.HTTP_FORBIDDEN) {
          logger.warn("Could not lookup route:{} in namespace:{}, due to:{} ", serviceName, namespace, e.getMessage());
        }
      }
    }
    return null;
  
<no_super_class>