BundleUpgradeParser { @VisibleForTesting static List<VersionRangedName> parseForceRemoveLegacyItemsHeader(String input, Bundle bundle, Supplier<? extends Iterable<? extends RegisteredType>> typeSupplier) { return parseVersionRangedNameList(input, false, getTypeNamesInBundle(typeSupplier), "[0,"+bundle.getVersion()+")"); }  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 testParseForceRemoveLegacyItemsHeader() throws Exception { Bundle bundle = newMockBundle(new VersionedName("mybundle", "1.0.0")); Supplier<Iterable<RegisteredType>> typeSupplier = Suppliers.ofInstance(ImmutableList.of( newMockRegisteredType("foo", "1.0.0"), newMockRegisteredType("bar", "1.0.0"))); assertParseForceRemoveLegacyItemsHeader("\"foo:0.1.0\"", bundle, typeSupplier, ImmutableList.of(new VersionRangedName("foo", exactly0dot1))); assertParseForceRemoveLegacyItemsHeader("\"*\"", bundle, typeSupplier, ImmutableList.of(new VersionRangedName("foo", from0lessThan1), new VersionRangedName("bar", from0lessThan1))); assertParseForceRemoveLegacyItemsHeader("*", bundle, typeSupplier, ImmutableList.of(new VersionRangedName("foo", from0lessThan1), new VersionRangedName("bar", from0lessThan1))); assertParseForceRemoveLegacyItemsHeader("*:1.0.0.SNAPSHOT, \"foo:[0.1,1)", bundle, typeSupplier, ImmutableList.of(new VersionRangedName("foo", VersionRange.valueOf("[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]")), new VersionRangedName("bar", VersionRange.valueOf("[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]")), new VersionRangedName("foo", VersionRange.valueOf("[0.1,1)")))); }