void () { MyElement element = createElement("<a/>", MyElement.class); DomElementsProblemsHolderImpl holder = new DomElementsProblemsHolderImpl(DomUtil.getFileElement(element)); DomElementProblemDescriptorImpl error = new DomElementProblemDescriptorImpl(element, "abc", HighlightSeverity.ERROR); DomElementProblemDescriptorImpl warning = new DomElementProblemDescriptorImpl(element, "abc", HighlightSeverity.WARNING); holder.addProblem(error, MockDomInspection.getInspection()); holder.addProblem(warning, MockDomInspection.getInspection()); assertEquals(List.of(error), holder.getProblems(element, true, true, HighlightSeverity.ERROR)); assertEquals(List.of(error, warning), holder.getProblems(element, true, true, HighlightSeverity.WARNING)); }