ArtifactLoader { public Artifact load(File path) throws IOException { return load(new ArtifactName(path.getName()), path); }  Artifact load(File path); Artifact load(ArtifactName artifactName, File path); static void main(String[] args);  }
@Test public void testLoadRtJar() throws Exception { final String classPath = System.getProperty("java.class.path"); final Collection<File> files = Arrays.stream(classPath.split(System.getProperty("path.separator"))) .map(File::new) .filter(file -> file.isFile() && file.getName().equals("rt.jar")) .collect(Collectors.toList()); Assume.assumeTrue( "Cannot test that rt.jar from classpath can be loaded because rt.jar could not be found", !files.isEmpty()); for (File file : files) { final Artifact artifact = loader.load(file); assertThat(artifact.classes()).isNotEmpty(); } }