@SuppressWarnings("unchecked")
    @Test
    @OSGiVersionSpecs({
        @OSGiSpec(version="4.1", sections = {"6.1.4", "6.1.4.14"}),
        @OSGiSpec(version="4.2", sections = {"6.1.4", "6.1.4.16"})
    })
    public void testGetEntryPaths() throws Exception {
        BundleSpecifier outer = m_bu.createBundleSpecifier("outer")
        .pack("streamOne", new ByteArrayInputStream("theInner".getBytes()))
        .pack("folderOne/streamOne", new ByteArrayInputStream("theInner".getBytes()));

        Bundle b = m_bu.installBundle(outer);

        boolean foundEntry = false;
        boolean foundFolder = false;
        int nrEntries = 0;
        Enumeration e = b.getEntryPaths("/");
        StringBuilder foundEntries = new StringBuilder();
        while (e.hasMoreElements()) {
            nrEntries++;
            String entry = (String) e.nextElement();
            foundEntries.append(entry + "\n");
            if (entry.equals("streamOne")) {
                foundEntry = true;
            }
            if (entry.equals("folderOne/")) {
                foundFolder = true;
            }
        }

        StringBuilder whatHappened = new StringBuilder().append("getEntryPaths did not return what we expected:\n");
        if (nrEntries == 1) {
            whatHappened.append("we found 1 entry as expected,\n");
        }
        else {
            whatHappened.append("we expected to find 1 entry, but found " + nrEntries + "\n");
        }
        whatHappened.append("We found the following path entries:\n")
        .append(foundEntries);

        assert (nrEntries == 1) && foundEntry && !foundFolder : whatHappened.toString();
    }