FeaturesServiceImpl svc = new FeaturesServiceImpl(null, bundleContext, new Storage(), null, null, null, null, null, null, null, null, null);
svc.addRepository(uri);
try {
List<String> features = new ArrayList<String>();
for (Feature feature : svc.listFeatures()) {
features.add(feature.getId());
}
Collections.reverse(features);
svc.installFeatures(new CopyOnWriteArraySet<String>(features),
EnumSet.noneOf(FeaturesService.Option.class));