assertEquals("20080101", bundleInfo.getVersion().qualifier());
assertEquals("1.0.0.20080101", bundleInfo.getVersion().toString());
assertEquals(2, bundleInfo.getRequires().size());
Set<BundleRequirement> expectedRequires = new HashSet<BundleRequirement>();
expectedRequires.add(new BundleRequirement(BundleInfo.BUNDLE_TYPE, "com.acme.bravo",
new VersionRange("2.0.0"), null));
expectedRequires.add(new BundleRequirement(BundleInfo.BUNDLE_TYPE, "com.acme.delta",
new VersionRange("4.0.0"), null));
assertEquals(expectedRequires, bundleInfo.getRequires());
assertEquals(0, bundleInfo.getExports().size());
assertEquals(2, bundleInfo.getImports().size());
assertNull(bundleInfo.getClasspath());
final String importsList = bundleInfo.getImports().toString();
assertTrue(importsList.indexOf("com.acme.bravo") != -1);
assertTrue(importsList.indexOf("com.acme.delta") != -1);
bundleInfo = ManifestParser.parseJarManifest(getClass().getResourceAsStream(
"com.acme.bravo-2.0.0.20080202.jar"));
assertNotNull(bundleInfo);
assertEquals("com.acme.bravo", bundleInfo.getSymbolicName());
assertEquals("20080202", bundleInfo.getVersion().qualifier());
assertEquals("2.0.0.20080202", bundleInfo.getVersion().toString());
assertEquals(1, bundleInfo.getRequires().size());
expectedRequires = new HashSet<BundleRequirement>();
expectedRequires.add(new BundleRequirement(BundleInfo.BUNDLE_TYPE, "com.acme.charlie",
new VersionRange("3.0.0"), null));
assertEquals(1, bundleInfo.getExports().size());
assertTrue(bundleInfo.getExports().toString().indexOf("com.acme.bravo") != -1);
assertEquals(1, bundleInfo.getImports().size());
assertTrue(bundleInfo.getImports().toString().indexOf("com.acme.charlie") != -1);
}