@Override
  public List<String> detect(ClassLoader classLoader) {
    List<File> classpathContents =
        classGraph
            .disableNestedJarScanning()
            .addClassLoader(classLoader)
            .scan(1)
            .getClasspathFiles();

    return classpathContents.stream().map(File::getAbsolutePath).collect(Collectors.toList());
  }
@Test
  public void shouldDetectClassPathResourceFromJavaClassPathEnvVariable() throws IOException {
    String path = tmpFolder.newFolder("folder").getCanonicalPath();
    System.setProperty("java.class.path", path);
    ClasspathScanningResourcesDetector detector =
        new ClasspathScanningResourcesDetector(new ClassGraph());

    List<String> resources = detector.detect(null);

    assertThat(resources, hasItems(containsString(path)));
  }