BundleContext bundleContext = EasyMock.createMock(BundleContext.class);
Bundle bundlef101 = createDummyBundle(12345L, "bundle-f1-0.1", headers());
Bundle bundlef201 = createDummyBundle(54321L, "bundle-f2-0.1", headers());
expect(bundleManager.getDataFile(EasyMock.<String> anyObject())).andReturn(dataFile).anyTimes();
expect(bundleManager.installBundleIfNeeded("bundle-f1-0.1", 0, null))
.andReturn(new BundleInstallerResult(bundlef101, true));
expect(bundleManager.installBundleIfNeeded("bundle-f2-0.1", 0, null))
.andReturn(new BundleInstallerResult(bundlef201, true));
expect(bundleManager.getBundleContext()).andReturn(bundleContext).anyTimes();
expect(bundleContext.getBundle(12345)).andReturn(bundlef101).anyTimes();
ignoreRefreshes(bundleManager);
bundleManager.uninstall(Collections.EMPTY_LIST, true);