LightProjectDescriptor () { return new LightProjectDescriptor() { @Override protected void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { super.configureModule(module, model, contentEntry); IntelliJProjectConfiguration.LibraryRoots junit4Library = IntelliJProjectConfiguration.getProjectLibrary("JUnit4"); ModuleRootModificationUtil.addModuleLibrary(module, "JUnit4", junit4Library.getClassesUrls(), junit4Library.getSourcesUrls(), Collections.emptyList(), DependencyScope.COMPILE, false); } }; }