public void testGetServices() throws Exception {
assertTrue(registry.getServices("bean1", new Class<?>[]{String.class}, false).isEmpty());
final ServiceRegistryEntry ref1 = registryaddService("bean1", "module1", "some service 1", null, Collections.<String,Object>singletonMap("service.ranking", 100), classLoader);
assertEquals(1, registry.getServices("bean1", new Class<?>[]{String.class}, false).size());
assertEquals(0, registry.getServices("bean1", new Class<?>[]{Integer.class}, false).size());
final ServiceRegistryEntry ref2 = registryaddService("bean1", "module2", "some service 2", null, Collections.<String,Object>singletonMap("service.ranking", 400), classLoader);
List<ServiceRegistryEntry> services = registry.getServices("bean1", new Class<?>[]{ String.class }, false);
assertEquals(2, services.size());
assertEquals(ref2, services.get(0));
assertEquals(0, registry.getServices("bean1", new Class<?>[]{Integer.class}, false).size());