* Tests that we can install a new bundle through a fix-package.
*/
@Test
public void testInstallBundleWithDependencyInFixPackageUpdateOk() throws Exception
{
DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")));
DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
assertNotNull("No deployment package returned?!", dp1);
awaitRefreshPackagesEvent();
Bundle bundle = dp1.getBundle(getSymbolicName("bundle2"));
assertNotNull("Failed to obtain bundle from deployment package?!", bundle);
assertEquals(Bundle.INSTALLED, bundle.getState());
dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
dpBuilder.setFixPackage("[1.0,2.0)").add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle1"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")).setMissing());
DeploymentPackage dp2 = installDeploymentPackage(dpBuilder);
assertNotNull("No deployment package returned?!", dp2);
awaitRefreshPackagesEvent();