### Question:
ServiceDiscovery { protected void reload(DiscoveryConfig... configs) { reload(Lists.newArrayList(configs)); } ServiceDiscovery(final ServiceRepository serviceRepository, final ArtemisClientConfig config); void registerDiscoveryConfig(DiscoveryConfig config); Service getService(DiscoveryConfig config);  }### Answer:
@Test public void testReload() throws Exception { final ServiceRepository serviceRepository = new ServiceRepository(ArtemisClientConstants.DiscoveryClientConfig); final List<Service> services = Lists.newArrayList(); Assert.assertEquals(0, services.size()); Set<String> serviceKeys = Sets.newHashSet(ArtemisClientConstants.RegistryService.Net.serviceKey, ArtemisClientConstants.RegistryService.Java.serviceKey); Map<String, ServiceChangeListener> serviceChangeListeners = Maps.newHashMap(); for (String serviceKey : serviceKeys) { DefaultServiceChangeListener listener = new DefaultServiceChangeListener(); DiscoveryConfig discoveryConfig = new DiscoveryConfig(serviceKey); serviceChangeListeners.put(serviceKey, listener); serviceRepository.registerServiceChangeListener(discoveryConfig, listener); serviceRepository.serviceDiscovery.reload(discoveryConfig); Assert.assertTrue(listener.getServiceChangeEvents().size() >= 1); for (ServiceChangeEvent event : listener.getServiceChangeEvents()) { Assert.assertEquals(InstanceChange.ChangeType.RELOAD, event.changeType()); Assert.assertEquals(serviceKey, event.changedService().getServiceId()); } } }