ModuleAutoFinder implements ModuleList { protected Set<File> getFilesFromClasspath() { Set<File> files = new HashSet<>(); String paths = System.getProperty("java.class.path"); StringTokenizer st = new StringTokenizer(paths, File.pathSeparator + "\n"); while (st.hasMoreTokens()) { String path = st.nextToken(); File f = new File(path); if (f.exists()) { try { f = f.getCanonicalFile(); files.add(f); } catch (IOException e) { e.printStackTrace(); } } } return files; } @Inject  ModuleAutoFinder();  ModuleAutoFinder(Transformer<Class<? extends Module>, Boolean> accept,
			Transformer<Class<? extends Module>, Boolean> ignore); @Override Collection<Class<? extends Module>> getModules(); void addListener(ModuleAutoFinderListener listener); void removeListener(ModuleAutoFinderListener listener);  }
@Test public void getFilesFromClasspath() { ModuleAutoFinder moduleAutoFinder = new ModuleAutoFinder(); Set<File> files = moduleAutoFinder.getFilesFromClasspath(); Assert.assertFalse(files.isEmpty()); for (File file : files) { Assert.assertTrue(file.exists()); Assert.assertTrue(file.getName() + " not in classpath: " + System.getProperty("java.class.path"), System .getProperty("java.class.path").contains(file.getName())); } }