@Test public void testGetServiceInstancesWithInvalidServiceId() { String someInvalidServiceId = "someInvalidServiceId"; assertTrue(kubernetesDiscoveryService.getServiceInstances(someInvalidServiceId).isEmpty()); }
@Override public List<ServiceDTO> getServiceInstances(String serviceId) { String configName = SERVICE_ID_TO_CONFIG_NAME.get(serviceId); if (configName == null) { return Collections.emptyList(); } return assembleServiceDTO(serviceId, bizConfig.getValue(configName)); }
KubernetesDiscoveryService implements DiscoveryService { @Override public List<ServiceDTO> getServiceInstances(String serviceId) { String configName = SERVICE_ID_TO_CONFIG_NAME.get(serviceId); if (configName == null) { return Collections.emptyList(); } return assembleServiceDTO(serviceId, bizConfig.getValue(configName)); } }
KubernetesDiscoveryService implements DiscoveryService { @Override public List<ServiceDTO> getServiceInstances(String serviceId) { String configName = SERVICE_ID_TO_CONFIG_NAME.get(serviceId); if (configName == null) { return Collections.emptyList(); } return assembleServiceDTO(serviceId, bizConfig.getValue(configName)); } KubernetesDiscoveryService(final BizConfig bizConfig); }
KubernetesDiscoveryService implements DiscoveryService { @Override public List<ServiceDTO> getServiceInstances(String serviceId) { String configName = SERVICE_ID_TO_CONFIG_NAME.get(serviceId); if (configName == null) { return Collections.emptyList(); } return assembleServiceDTO(serviceId, bizConfig.getValue(configName)); } KubernetesDiscoveryService(final BizConfig bizConfig); @Override List<ServiceDTO> getServiceInstances(String serviceId); }
KubernetesDiscoveryService implements DiscoveryService { @Override public List<ServiceDTO> getServiceInstances(String serviceId) { String configName = SERVICE_ID_TO_CONFIG_NAME.get(serviceId); if (configName == null) { return Collections.emptyList(); } return assembleServiceDTO(serviceId, bizConfig.getValue(configName)); } KubernetesDiscoveryService(final BizConfig bizConfig); @Override List<ServiceDTO> getServiceInstances(String serviceId);  }