void (@NotNull String name, String @NotNull ... expectedItems) { ((PsiManagerEx)myFixture.getPsiManager()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, myFixture.getTestRootDisposable()); GotoSymbolModel2 model = new GotoSymbolModel2(myFixture.getProject(), myFixture.getTestRootDisposable()); assertContainsElements(Arrays.asList(model.getNames(false)), name); final ArrayList<String> actual = new ArrayList<>(); for (Object o : model.getElementsByName(name, false, "")) { if (o instanceof NavigationItem) { final ItemPresentation presentation = ((NavigationItem)o).getPresentation(); assertNotNull(presentation); actual.add(presentation.getPresentableText() + " " + presentation.getLocationString()); } } assertSameElements(actual, expectedItems); }