void () { myFixture.configureByText("Test.java", "class X {}"); Java8MapApiInspection inspection = new Java8MapApiInspection(); myFixture.enableInspections(inspection); UpdateInspectionOptionFix fix = new UpdateInspectionOptionFix(inspection, "mySuggestMapComputeIfAbsent", "Update", false); IntentionPreviewInfo info = fix.generatePreview(myFixture.getActionContext()); assertTrue(info instanceof IntentionPreviewInfo.Html); assertEquals("Uncheck inspection option:<br/><br/><table><tr><td><input readonly=\"true\" type=\"checkbox\"/></td>" + "<td>Suggest conversion to Map.computeIfAbsent</td></tr></table>", ((IntentionPreviewInfo.Html)info).content().toString()); assertTrue(((Java8MapApiInspection)InspectionProfileManager.getInstance(getProject()).getCurrentProfile() .getUnwrappedTool("Java8MapApi", myFixture.getFile())).mySuggestMapComputeIfAbsent); ModCommand command = fix.perform(myFixture.getActionContext()); Runnable cmd = () -> ModCommandExecutor.getInstance().executeInteractively(myFixture.getActionContext(), command, myFixture.getEditor()); CommandProcessor.getInstance().executeCommand(getProject(), cmd, null, null); assertFalse(((Java8MapApiInspection)InspectionProfileManager.getInstance(getProject()).getCurrentProfile() .getUnwrappedTool("Java8MapApi", myFixture.getFile())).mySuggestMapComputeIfAbsent); }