ServiceRegistration asr = context.registerService(ServiceInterface.class.getName(), new ServiceProvider(),
new Hashtable() {{ put(DependencyManager.ASPECT, sid); put(Constants.SERVICE_RANKING, 10); }});
ServiceRegistration asr2 = context.registerService(ServiceInterface.class.getName(), new ServiceProvider(),
new Hashtable() {{ put(DependencyManager.ASPECT, sid); put(Constants.SERVICE_RANKING, 20); }});
st.open();
Assert.assertEquals("There should be one service that matches the tracker", 1, st.getServices().length);
Assert.assertEquals("Service ranking should be 20", Integer.valueOf(20), (Integer) st.getServiceReference().getProperty(Constants.SERVICE_RANKING));
asr2.unregister();
Assert.assertEquals("There should be one service that matches the tracker", 1, st.getServices().length);