Iterable<? extends JavaFileObject> units = fileManager.getJavaFileObjects(moduleFile);
File destDir = new File("build/mainTest");
FileUtil.delete(destDir);
destDir.mkdirs();
CompilationTask task = compiler.getTask(null, null, null, Arrays.asList("-d", destDir.getPath(), "-cp", "build/classes"), null, units);
Boolean result = task.call();
assertTrue(result != null && result.booleanValue());
File compiledModuleFile = new File(destDir, "foo/foo/$module_.class");
assertTrue(compiledModuleFile.isFile());