void () { InspectionProfile profile = new InspectionProfileImpl("foo"); List<InspectionToolWrapper<?, ?>> tools = profile.getInspectionTools(null); PsiFile file = createDummyFile("xx.txt", "xxx"); for (InspectionToolWrapper<?, ?> toolWrapper : tools) { if (!toolWrapper.isEnabledByDefault()) { InspectionManagerEx instance = (InspectionManagerEx)InspectionManager.getInstance(myProject); GlobalInspectionContextImpl context = RunInspectionIntention.createContext(toolWrapper, instance, file); context.initializeTools(new ArrayList<>(), new ArrayList<>(), new ArrayList<>()); assertEquals(1, context.getTools().size()); return; } } fail("No disabled tools found: " + tools); }