BundleUpgradeParser { @VisibleForTesting static List<VersionRangedName> parseForceRemoveBundlesHeader(String input, Bundle bundle) { if (input == null) return ImmutableList.of(); return parseVersionRangedNameList(input, false, MutableList.of(bundle.getSymbolicName()), getDefaultSourceVersionRange(bundle)); }  static CatalogUpgrades parseBundleManifestForCatalogUpgrades(Bundle bundle, Supplier<? extends Iterable<? extends RegisteredType>> typeSupplier); @Beta
    static final String MANIFEST_HEADER_FORCE_REMOVE_LEGACY_ITEMS; @Beta
    static final String MANIFEST_HEADER_FORCE_REMOVE_BUNDLES; @Beta
    static final String MANIFEST_HEADER_UPGRADE_FOR_BUNDLES; @Beta
    static final String MANIFEST_HEADER_UPGRADE_FOR_TYPES; }
@Test public void testParseForceRemoveBundlesHeader() throws Exception { Bundle bundle = newMockBundle(new VersionedName("foo.bar", "1.2.3")); assertParseForceRemoveBundlesHeader("\"foo:0.1.0\"", bundle, ImmutableList.of(new VersionRangedName("foo", exactly0dot1))); assertParseForceRemoveBundlesHeader("\"*\"", bundle, ImmutableList.of(new VersionRangedName("foo.bar", from0lessThan1_2_3))); assertParseForceRemoveBundlesHeader("*", bundle, ImmutableList.of(new VersionRangedName("foo.bar", from0lessThan1_2_3))); assertParseForceRemoveBundlesHeader("other:1, '*:[0,1)'", bundle, ImmutableList.of( new VersionRangedName("other", VersionRange.valueOf("[1.0.0,1.0.0]")), new VersionRangedName("foo.bar", new VersionRange('[', Version.valueOf("0"), Version.valueOf("1"), ')')))); }