+ " <feature name='f1'><bundle start='true'>bundle-f1</bundle></feature>"
+ "</features>");
BundleManager bundleManager = EasyMock.createMock(BundleManager.class);
Bundle installedBundle = createDummyBundle(12345L, "bundle-f1", headers());
FeaturesServiceImpl svc = testAddRepository("bundle-f1", uri, bundleManager, installedBundle);
reset(bundleManager);
expect(bundleManager.installBundleIfNeeded(eq("bundle-f1"), eq(0), eq((String)null))).andReturn(new BundleInstallerResult(installedBundle, true));
expect(bundleManager.getDataFile(EasyMock.anyObject(String.class))).andReturn(dataFile);
ignoreRefreshes(bundleManager);
replay(bundleManager);
svc.installFeature("f1", org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION, EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
verify(bundleManager);
Feature[] installed = svc.listInstalledFeatures();
assertEquals(1, installed.length);
assertEquals("f1", installed[0].getName());
}