void () { mySource.initModule(); mySource.copyJdkFrom(myModule); IntelliJProjectConfiguration.LibraryRoots junit4Library = IntelliJProjectConfiguration.getProjectLibrary("JUnit4"); for (File file : junit4Library.getClasses()) { VirtualFile libFile = LocalFileSystem.getInstance().findFileByIoFile(file); assertNotNull(libFile); mySource.addLibrary(JarFileSystem.getInstance().getJarRootForLocalFile(libFile)); } }