@Test
public void testComputeClasspath() throws IOException {

  String tempDir = tmpFolder.getRoot().getAbsolutePath();
  File classesDir = new File(tempDir, "WEB-INF" + File.separator + "classes");
  if (!classesDir.exists()) {
    classesDir.mkdirs();
  }
  File libDir = new File(tempDir, "WEB-INF" + File.separator + "lib");
  if (!libDir.exists()) {
    libDir.mkdirs();
  }
  File jarFileInLibDir = new File(libDir.getAbsolutePath() + File.separator + "lib.jar");
  jarFileInLibDir.createNewFile();
  File jarFileInClasspath = new File(tempDir + File.separator + "classpath.jar");
  jarFileInClasspath.createNewFile();
  TestAction action = new TestAction();
  URL[] urls = action.computeClassPath(tempDir, jarFileInClasspath.getAbsolutePath());
  assertEquals(new File(classesDir.getAbsolutePath() + File.separator), new File(urls[0].getFile()));
  assertEquals(new File(jarFileInLibDir.getAbsolutePath()), new File(urls[1].getFile()));
  assertEquals(new File(jarFileInClasspath.getAbsolutePath()), new File(urls[2].getFile()));
}