static void checkForDuplicates(ClassLoader classLoader, ILogger logger, String resourceName) {
        try {
            List<URL> resources = Collections.list(classLoader.getResources(resourceName));
            if (resources.size() > 1) {
                String formattedResourceUrls = resources.stream().map(URL::toString).collect(Collectors.joining(", "));
                logger.warning("WARNING: Classpath misconfiguration: found multiple " + resourceName
                        + " resources: " + formattedResourceUrls);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
@Test
    public void should_NOT_log_warning_when_single_occurrence() throws Exception {
        URLClassLoader classLoader = classLoaderWithJars(dummyJarFile);

        DuplicatedResourcesScanner.checkForDuplicates(classLoader, logger, SOME_EXISTING_RESOURCE_FILE);

        verifyNoInteractions(logger);
    }