Sdk () { Sdk jdk = JavaAwareProjectJdkTableImpl.getInstanceEx().getInternalJdk(); Sdk sdk = PsiTestUtil.addJdkAnnotations(jdk); Collection<String> utilClassPath = ClassPathUtil.getUtilClassPath(); VirtualFile[] files = StreamEx.of(utilClassPath) .append(PathManager.getJarPathForClass(XmlElement.class)) .map(path -> path.endsWith(".jar") ? JarFileSystem.getInstance().findFileByPath(FileUtil.toSystemIndependentName(path) + "!/") : LocalFileSystem.getInstance().findFileByPath(FileUtil.toSystemIndependentName(path))) .toArray(VirtualFile[]::new); return PsiTestUtil.addRootsToJdk(sdk, OrderRootType.CLASSES, files); }