void () { UnusedSymbolLocalInspectionBase tool = myUnusedDeclarationInspection.getSharedLocalInspectionTool(); assertNotNull(tool); String oldVal = tool.getParameterVisibility(); try { tool.setParameterVisibility(PsiModifier.PRIVATE); doTest(true); } finally { tool.setParameterVisibility(oldVal); } }