void () { JpsModule dep = addModule("dep"); JpsTypedLibrary<JpsSdk<JpsDummyElement>> jdk8 = addJdk("1.8"); JpsModuleRootModificationUtil.addDependency(myModule, dep); JpsModuleRootModificationUtil.setModuleSdk(dep, jdk8.getProperties()); assertClassRoots(dependencies(myModule).recursively(), getRtJarJdk17()); assertClassRoots(dependencies(dep).recursively(), getRtJarJdk18()); }