void () { String text = """ class Test { void test1() { } void test2() { <caret>test1(); } } """; configure(text); myFixture.performEditorAction("CollapseBlock"); myFixture.getEditor().getCaretModel().moveToOffset(text.indexOf("test1")); myFixture.performEditorAction("HighlightUsagesInFile"); FindManager.getInstance(getProject()).findNextUsageInEditor(myFixture.getEditor()); assertEquals("test1", myFixture.getEditor().getSelectionModel().getSelectedText()); }