final CompilationTestHelper compilationHelper = CompilationTestHelper.newInstance(scanner);
List<JavaFileObject> fileObjects =
Lists.transform(filesToCompile, new Function<FileToCompile, JavaFileObject>() {
@Override
public JavaFileObject apply(FileToCompile file) {
return compilationHelper.fileManager().forSourceLines(file.name, file.lines);
}
});
compilationHelper.assertCompileSucceeds(fileObjects);
}
}