void () { myFixture.configureByText("Test.java", "class X {}"); Java8MapApiInspection inspection = new Java8MapApiInspection(); myFixture.enableInspections(inspection); ModCommand command = ModCommand.updateOption(myFixture.getFile(), inspection, tool -> { tool.mySuggestMapComputeIfAbsent = false; tool.mySuggestMapGetOrDefault = false; }); assertEquals("ModUpdateInspectionOptions[inspectionShortName=Java8MapApi, " + "options=[ModifiedInspectionOption[bindId=mySuggestMapComputeIfAbsent, oldValue=true, newValue=false], " + "ModifiedInspectionOption[bindId=mySuggestMapGetOrDefault, oldValue=true, newValue=false]]]", command.toString()); IntentionPreviewInfo preview = IntentionPreviewUtils.getModCommandPreview(command, myFixture.getActionContext()); assertTrue(preview 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>" + "Uncheck inspection option:<br/><br/><table><tr><td><input readonly=\"true\" type=\"checkbox\"/></td><td>Suggest conversion to Map.getOrDefault</td></tr></table>", ((IntentionPreviewInfo.Html)preview).content().toString()); }