@Test
    public void allowed_duplicates_are_visible_to_the_framework_and_vice_versa() throws  Exception {
        Bundle bundleA = startBundle(felix, "cert-a.jar");
        Bundle bundleB = startBundle(felix, "cert-b.jar");

        // Makes A and B visible to each other
        felix.allowDuplicateBundles(Set.of(bundleA, bundleB));

        List<Bundle> visibleBundles = felix.getBundles(bundleA);

        // The framework bundle should always be visible (the FindHook does not remove it)
        Bundle frameworkBundle = visibleBundles.get(0);
        assertTrue(isFrameworkBundle(frameworkBundle));

        // All bundles are always visible to the framework (this is according to the OSGi spec and handled by Felix)
        List<Bundle> visibleToFramework = felix.getBundles(frameworkBundle);
        assertEquals(3, visibleToFramework.size());
    }
Note that the '-dup' bundles are necessary, because installing a bundle with the same location as an already
installed bundle is a NOP. From the OSGi spec: "Every bundle is uniquely identified by its location string."

@author gjoranv
jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/BundleCollisionHookIntegrationTest.java