EurekaServiceDiscovery extends AbstractServiceDiscovery { @Override public Set<String> getServices() { Applications applications = this.eurekaClient.getApplications(); if (applications == null) { return Collections.emptySet(); } List<Application> registered = applications.getRegisteredApplications(); Set<String> names = new LinkedHashSet<>(); for (Application app : registered) { if (app.getInstances().isEmpty()) { continue; } names.add(app.getName().toLowerCase()); } return names; }  @Override void initialize(URL registryURL); @Override void destroy(); @Override void register(ServiceInstance serviceInstance); @Override void update(ServiceInstance serviceInstance); @Override void unregister(ServiceInstance serviceInstance); @Override Set<String> getServices(); @Override List<ServiceInstance> getInstances(String serviceName);  }
@Test public void testGetServices() { assertNotNull(serviceDiscovery.getServices()); }