void (@NotNull Module module, Sdk jdk) { ModuleRootModificationUtil.updateModel(module, model -> { model.clear(); if (jdk != null && ApplicationManager.getApplication().isUnitTestMode()) { WriteAction.runAndWait(() -> ProjectJdkTable.getInstance().addJdk(jdk, module.getProject())); } model.setSdk(jdk); }); }