### Question:
Classpath implements INameEnvironment { @Override public boolean isPackage(char[][] parentPackageName, char[] packageName) { String name = new String(CharOperation.concatWith(parentPackageName, packageName, '/')); return packages.containsKey(name); } Classpath(List<ClasspathEntry> entries, List<MutableClasspathEntry> localentries); @Override NameEnvironmentAnswer findType(char[][] compoundTypeName); @Override NameEnvironmentAnswer findType(char[] typeName, char[][] packageName); @Override boolean isPackage(char[][] parentPackageName, char[] packageName); @Override void cleanup(); void reset(); List<ClasspathEntry> getEntries();  }### Answer:
@Test public void testEmptyJarPackage() throws Exception { final List<ClasspathEntry> entries = new ArrayList<ClasspathEntry>(); for (Path file : JavaInstallation.getDefault().getClasspath()) { if (Files.isRegularFile(file)) { try { entries.add(ClasspathJar.create(file)); } catch (IOException e) { } } else if (Files.isDirectory(file)) { entries.add(ClasspathDirectory.create(file)); } } Classpath classpath = new Classpath(entries, null); Assert.assertTrue(classpath.isPackage(CharOperation.splitOn('.', "org".toCharArray()), "xml".toCharArray())); }