assertNotNull("Requirement not null", req);
Collection<Capability> caps = repo.findProviders(req);
assertEquals("Capability not null", 1, caps.size());
XIdentityCapability xcap = (XIdentityCapability) caps.iterator().next();
assertEquals("org.apache.felix.eventadmin", xcap.getSymbolicName());
InputStream content = ((XResource)xcap.getResource()).getContent();
try {
Bundle bundle = context.installBundle(xcap.getSymbolicName(), content);
try {
bundle.start();
Assert.assertEquals(Bundle.ACTIVE, bundle.getState());
ServiceReference sref = context.getServiceReference("org.osgi.service.event.EventAdmin");
assertNotNull("EventAdmin service not null", sref);