@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 shouldDetectJarFiles() throws Exception {
    File jarFile = createTestTmpJarFile("test");
    ClassLoader classLoader = new URLClassLoader(new URL[] {jarFile.toURI().toURL()});
    ClasspathScanningResourcesDetector detector =
        new ClasspathScanningResourcesDetector(new ClassGraph());

    List<String> result = detector.detect(classLoader);

    assertThat(result, hasItem(containsString(jarFile.getCanonicalPath())));
  }