}
@Test
public void test2() throws Exception {
RepositoryImpl repo = new RepositoryImpl(getClass().getResource("data2/features.xml").toURI());
Map<String, Set<String>> features = new HashMap<String, Set<String>>();
addToMapSet(features, "root/apps1", "f1");
addToMapSet(features, "root/apps1", "f3");
addToMapSet(features, "root/apps2", "f1");
Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
addToMapSet(expected, "root/apps1", "c/1.0.0");
addToMapSet(expected, "root/apps1", "b/1.0.0");
addToMapSet(expected, "root/apps1", "e/1.0.0");
addToMapSet(expected, "root/apps1#f1", "a/1.0.0");
addToMapSet(expected, "root/apps1#f1", "d/1.0.0");
addToMapSet(expected, "root/apps2", "b/1.0.0");
addToMapSet(expected, "root/apps2", "c/1.0.0");
addToMapSet(expected, "root/apps2#f1", "a/1.0.0");
SubsystemResolver resolver = new SubsystemResolver(new TestDownloadManager(getClass(), "data2"));
resolver.prepare(Arrays.asList(repo.getFeatures()),
features,
Collections.<String, Set<BundleRevision>>emptyMap());
resolver.resolve(Collections.<String>emptySet(),
FeaturesService.DEFAULT_FEATURE_RESOLUTION_RANGE,
null);