Module (@NotNull String moduleName, @Nullable VirtualFile sourceRoot) { return WriteAction.computeAndWait(() -> { final Module module = createModule(moduleName); if (sourceRoot != null) { PsiTestUtil.addSourceContentToRoots(module, sourceRoot); } ModuleRootModificationUtil.setModuleSdk(module, getTestProjectJdk()); return module; }); }