void () { BaseInspectionProfileManager profileManager = getApplicationProfileManager(); InspectionProfileImpl localProfile = createProfile(); updateProfile(profileManager, localProfile); ProjectInspectionProfileManager projectProfileManager = ProjectInspectionProfileManager.getInstance(getProject()); try { // normally on open project profile wrappers are init for both managers updateProfile(profileManager, localProfile); InspectionProfileImpl profile = new InspectionProfileImpl(PROFILE, InspectionToolRegistrar.getInstance(), projectProfileManager, null); updateProfile(projectProfileManager, profile); projectProfileManager.setRootProfile(profile.getName()); assertThat(profile).isEqualTo(projectProfileManager.getCurrentProfile()); } finally { projectProfileManager.deleteProfile(PROFILE); } }