void () { String path = PathManagerEx.getTestDataPath() + BASE_PATH + "/" + getTestName(true); VirtualFile root = LocalFileSystem.getInstance().findFileByIoFile(new File(path)); assert root != null : path; loadAllModulesUnder(root); ModuleManager moduleManager = ModuleManager.getInstance(getProject()); Module java4 = moduleManager.findModuleByName("java4"); Module java5 = moduleManager.findModuleByName("java5"); Sdk jdk17 = IdeaTestUtil.getMockJdk17("java 1.4"); WriteAction.runAndWait(() -> ProjectJdkTable.getInstance().addJdk(jdk17, getTestRootDisposable())); ModuleRootModificationUtil.setModuleSdk(java4, jdk17); Sdk jdk171 = IdeaTestUtil.getMockJdk17("java 1.5"); WriteAction.runAndWait(() -> ProjectJdkTable.getInstance().addJdk(jdk171, getTestRootDisposable())); ModuleRootModificationUtil.setModuleSdk(java5, jdk171); ModuleRootModificationUtil.addDependency(java5, java4); configureByExistingFile(root.findFileByRelativePath("moduleJava5/com/Java5.java")); Collection<HighlightInfo> infos = highlightErrors(); assertEmpty(infos); }