JVMUtil { public static File[] getClasspath() { return getClasspath(ClassLoaderUtil.getContextClassLoader()); }  static boolean appendToClassPath(String name); static String[] addAllJarsToClassPath(String dirName); static Manifest getManifest(File classpathItem); static File[] getClasspath(); static File[] getClasspath(ClassLoader classLoader); static final JavaRuntimeInfo getJavaRuntimeInfo();  }
@Test public void getClasspath() { try { assertTrue(JVMUtil.getClasspath().length > 0); assertTrue(JVMUtil.getClasspath(ClassLoader.getSystemClassLoader()).length > 0); assertArrayEquals(JVMUtil.getClasspath(), JVMUtil.getClasspath(ClassLoader.getSystemClassLoader())); assertEquals(1, JVMUtil.getClasspath(null).length); } catch (Exception e) { assertEquals("JVMUtil.getManifestFromJar Error", e.getMessage()); assertEquals(RuntimeException.class, e.getClass()); assertEquals("error in opening zip file", e.getCause().getMessage()); assertEquals(java.util.zip.ZipException.class, e.getCause().getClass()); } }