void () { MyElement myElement = createElement("<a><my-class>abc</my-class></a>", MyElement.class); new MockDomInspection<>(MyElement.class).checkFile(DomUtil.getFile(myElement), InspectionManager.getInstance(getProject()), true); DomElementsProblemsHolder holder = DomElementAnnotationsManager.getInstance(getProject()).getProblemHolder(myElement); DomElement element = myElement.getMyClass(); assertEquals(0, holder.getProblems(myElement).size()); assertEquals(0, holder.getProblems(myElement).size()); assertEquals(1, holder.getProblems(element).size()); assertEquals(1, holder.getProblems(element).size()); assertEquals(1, holder.getProblems(myElement, true, true).size()); assertEquals(1, holder.getProblems(myElement, true, true).size()); }