@Test
    public void duplicates_whitelist_is_reset_upon_each_call() throws Exception {
        Bundle bundleL = startBundle(felix, "cert-l1.jar");
        Bundle bundleMl = startBundle(felix, "cert-ml.jar");
        felix.allowDuplicateBundles(Collections.singleton(bundleL));
        felix.allowDuplicateBundles(Collections.singleton(bundleMl));

        try {
            startBundle(felix, "cert-l1-dup.jar");
            fail("Expected exception due to duplicate bundles");
        } catch (BundleException e) {
            assertTrue(e.getMessage().contains("Bundle symbolic name and version are not unique"));
        }
    }
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