void () { myFixture.copyDirectoryToProject("content/anno/suppressed", "content/anno/suppressed"); ApplicationManager.getApplication().runWriteAction(() -> { final Module module = myFixture.getModule(); final ModifiableRootModel model = ModuleRootManager.getInstance(module).getModifiableModel(); final String url = VfsUtilCore.pathToUrl(myFixture.getTempDirPath() + "/content/anno"); model.getModuleExtension(JavaModuleExternalPaths.class).setExternalAnnotationUrls(new String[]{url}); model.commit(); }); }