void (@NotNull final CodeInsightTestFixture fixture, @NotNull final String testToFind) { final PsiElement element = fixture.findElementByText(testToFind, PsiElement.class); assert element != null : "No element found by text: " + testToFind; fixture.getEditor().getCaretModel().moveToOffset(element.getTextOffset()); }