File generationPath = new File("target", TEMP_GENERATION_PATH);
GenerationDirectory generationFolder = new GenerationDirectory(generationPath, new File(TEMP_GENERATION_PATH), new File(""));
String sourcePath = "src/test/java";
File resourcePath = new File("src/test/resources");
ClassWithJavascript stjsClass = gen.generateJavascript(Thread.currentThread().getContextClassLoader(), clazz.getName(), new File(
sourcePath), generationFolder, new File("target", "test-classes"),
new GeneratorConfigurationBuilder().allowedPackage("org.stjs.javascript").allowedPackage("org.stjs.generator")
.allowedPackage(clazz.getPackage().getName()).generateSourceMap(withSourceMap).build());
Timers.start("js-exec");
List<File> javascriptFiles = new ArrayList<File>();
try {
File jsFile = new File(generationPath, stjsClass.getJavascriptFiles().get(0).getPath());
String content = Files.toString(jsFile, Charset.defaultCharset());
List<ClassWithJavascript> allDeps = new DependencyCollection(stjsClass).orderAllDependencies(Thread.currentThread()
.getContextClassLoader());
for (ClassWithJavascript dep : allDeps) {
for (URI js : dep.getJavascriptFiles()) {