@Test public void convert_secure_healthUrl() { InstanceInfo instanceInfo = mock(InstanceInfo.class); when(instanceInfo.getSecureHealthCheckUrl()).thenReturn("https: EurekaServiceInstance service = mock(EurekaServiceInstance.class); when(service.getInstanceInfo()).thenReturn(instanceInfo); when(service.getUri()).thenReturn(URI.create("http: when(service.getServiceId()).thenReturn("test"); Registration registration = new EurekaServiceInstanceConverter().convert(service); assertThat(registration.getHealthUrl()).isEqualTo("https: }
@Override protected URI getHealthUrl(ServiceInstance instance) { Assert.isInstanceOf(EurekaServiceInstance.class, instance, "serviceInstance must be of type EurekaServiceInstance"); InstanceInfo instanceInfo = ((EurekaServiceInstance) instance).getInstanceInfo(); String healthUrl = instanceInfo.getSecureHealthCheckUrl(); if (StringUtils.isEmpty(healthUrl)) { healthUrl = instanceInfo.getHealthCheckUrl(); } return URI.create(healthUrl); }
EurekaServiceInstanceConverter extends DefaultServiceInstanceConverter { @Override protected URI getHealthUrl(ServiceInstance instance) { Assert.isInstanceOf(EurekaServiceInstance.class, instance, "serviceInstance must be of type EurekaServiceInstance"); InstanceInfo instanceInfo = ((EurekaServiceInstance) instance).getInstanceInfo(); String healthUrl = instanceInfo.getSecureHealthCheckUrl(); if (StringUtils.isEmpty(healthUrl)) { healthUrl = instanceInfo.getHealthCheckUrl(); } return URI.create(healthUrl); } }
EurekaServiceInstanceConverter extends DefaultServiceInstanceConverter { @Override protected URI getHealthUrl(ServiceInstance instance) { Assert.isInstanceOf(EurekaServiceInstance.class, instance, "serviceInstance must be of type EurekaServiceInstance"); InstanceInfo instanceInfo = ((EurekaServiceInstance) instance).getInstanceInfo(); String healthUrl = instanceInfo.getSecureHealthCheckUrl(); if (StringUtils.isEmpty(healthUrl)) { healthUrl = instanceInfo.getHealthCheckUrl(); } return URI.create(healthUrl); }  }
EurekaServiceInstanceConverter extends DefaultServiceInstanceConverter { @Override protected URI getHealthUrl(ServiceInstance instance) { Assert.isInstanceOf(EurekaServiceInstance.class, instance, "serviceInstance must be of type EurekaServiceInstance"); InstanceInfo instanceInfo = ((EurekaServiceInstance) instance).getInstanceInfo(); String healthUrl = instanceInfo.getSecureHealthCheckUrl(); if (StringUtils.isEmpty(healthUrl)) { healthUrl = instanceInfo.getHealthCheckUrl(); } return URI.create(healthUrl); }   }
EurekaServiceInstanceConverter extends DefaultServiceInstanceConverter { @Override protected URI getHealthUrl(ServiceInstance instance) { Assert.isInstanceOf(EurekaServiceInstance.class, instance, "serviceInstance must be of type EurekaServiceInstance"); InstanceInfo instanceInfo = ((EurekaServiceInstance) instance).getInstanceInfo(); String healthUrl = instanceInfo.getSecureHealthCheckUrl(); if (StringUtils.isEmpty(healthUrl)) { healthUrl = instanceInfo.getHealthCheckUrl(); } return URI.create(healthUrl); }    }