Component component = m.createComponent().setInterface(MyService2.class.getName(), null).setImplementation(new MyComponent(e));
ServiceDependency dependency = m.createServiceDependency().setService(MyService.class).setRequired(true);
ServiceDependency dependency2 = m.createServiceDependency().setService(MyService.class).setRequired(true);
ServiceTracker st = new ServiceTracker(context, MyService2.class.getName(), null);
st.open();
Component component2 = m.createComponent().setInterface(MyService.class.getName(), null).setImplementation(new MyImpl(e));
// add the component: it has no dependencies so it should be activated immediately
m.add(component);
Assert.assertNotNull("service should be available", st.getService());