@Override
    public Enumeration<URL> getResources(String name) throws IOException {
        final List<URL> urls = new ArrayList<>();
        for (ClassLoader classLoader : classLoaders) {
            final Enumeration<URL> resources = classLoader.getResources(name);

            if (resources.hasMoreElements()) {
                urls.addAll(Collections.list(resources));
            }
        }

        if (urls.isEmpty() && LOG.isTraceEnabled()) {
            LOG.trace("Resource " + name + " not found.");
        }

        return Collections.enumeration(urls);
    }
@Test
    public void getResourcesReturnsEmptyEnumerationIfResourceDoesNotExist() throws Exception {
        final ChainingClassLoader chainingClassLoader = new ChainingClassLoader(getClass().getClassLoader());
        final Enumeration<URL> resources = chainingClassLoader.getResources("ThisClassHopeFullyDoesNotExist" + Instant.now().toEpochMilli());
        assertThat(resources.hasMoreElements()).isFalse();
    }