Collection<Feature> lst) throws Exception {
ServiceReference[] svcrefs = createTestServiceReferences(names, restricted);
EasyMock.expect(bundleContext.getServiceReferences(Feature.class.getName(), null))
.andReturn(svcrefs);
for (int i = 0; i < names.length; i++) {
Feature f = control.createMock(Feature.class);
EasyMock.expect(bundleContext.getService(svcrefs[i])).andReturn(f).anyTimes();
}
EasyMock.expect(bus.getFeatures()).andReturn(lst).anyTimes();
}