@PublicAPI(usage = ACCESS)
    public static Set<Location> ofPackage(String pkg) {
        ImmutableSet.Builder<Location> result = ImmutableSet.builder();
        for (Location location : getLocationsOf(asResourceName(pkg))) {
            result.add(location);
        }
        return result.build();
    }
@Test
    public void locations_of_packages_from_custom_ClassLoader_for_JARs_without_directory_entries() throws IOException {
        JarFile jarFile = new TestJarFile()
                .withoutDirectoryEntries()
                .withEntry(classFileEntry(SomeEnum.class).toAbsolutePath())
                .create();
        URL jarUrl = getJarUrlOf(jarFile);

        Thread.currentThread().setContextClassLoader(new CustomClassLoader(jarUrl));

        String packageName = SomeEnum.class.getPackage().getName();
        assertThat(Locations.ofPackage(packageName))
                .as("Locations of package '%s'", packageName)
                .noneMatch(it -> it.contains(jarUrl.toString()));
    }