### Question:
Classpath { public static List<Path> getClasspathElements(String classpath, String pathSeparator) { List<Path> results = new ArrayList<>(); for (String path : classpath.split(Pattern.quote(pathSeparator))) { results.add(new File(path).toPath()); } return results; }  static Path[] currentClasspath(); static List<Path> getClasspathElements(String classpath, String pathSeparator); static List<Path> excludeJdkClasses(List<Path> classpath);  }### Answer:
@Test public void extracts_classpath_elements_on_Windows() { assertThat(Classpath.getClasspathElements("C:\\foo.jar;C:\\bar.jar", ";"), is(asList(Paths.get("C:\\foo.jar"), Paths.get("C:\\bar.jar")))); }
@Test public void extracts_classpath_elements_on_Unix() { assertThat(Classpath.getClasspathElements("/foo.jar:/bar.jar", ":"), is(asList(Paths.get("/foo.jar"), Paths.get("/bar.jar")))); }
@Test public void workaround_for_Eclipse_JUnit_integration_producing_invalid_classpath_elements_on_Windows() { String troublesomePath = "/C:/eclipse/configuration/org.eclipse.osgi/bundles/200/1/.cp/"; Path fixedPath = Classpath.getClasspathElements(troublesomePath, ";").get(0); assertThat(fixedPath.toString(), containsString("C:")); assertThat(fixedPath.getFileName().toString(), is(".cp")); }