void () { super.setUpModule(); ApplicationManager.getApplication().runWriteAction(() -> { final String modulePath = getTestAppPath(); final String srcPath = modulePath + File.separator + SOURCES_DIRECTORY_NAME; VirtualFile moduleDir = LocalFileSystem.getInstance().findFileByPath(modulePath.replace(File.separatorChar, '/')); VirtualFile srcDir = LocalFileSystem.getInstance().findFileByPath(srcPath.replace(File.separatorChar, '/')); final ModuleRootManager rootManager = ModuleRootManager.getInstance(myModule); PsiTestUtil.removeAllRoots(myModule, rootManager.getSdk()); PsiTestUtil.addContentRoot(myModule, moduleDir); PsiTestUtil.addSourceRoot(myModule, srcDir); IdeaTestUtil.setModuleLanguageLevel(myModule, LanguageLevel.JDK_1_8); Path outputDir = getModuleOutputDir(); PsiTestUtil.setCompilerOutputPath(myModule, VfsUtilCore.pathToUrl(outputDir.toString()), false); }); }