void () { JpsLibraryDependency dependency = myModule.getDependenciesList().addLibraryDependency(createJDomLibrary()); getJavaService().getOrCreateDependencyExtension(dependency).setScope(JpsJavaDependencyScope.RUNTIME); JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary(), JpsJavaDependencyScope.RUNTIME, false); assertClassRoots(dependencies(myModule).withoutSdk(), getFastUtilJar()); assertClassRoots(dependencies(myModule).withoutSdk().exportedOnly()); assertClassRoots(dependencies(myModule).withoutSdk().compileOnly()); }