void () { PsiFile file = PsiFileFactory.getInstance(getProject()).createFileFromText( "a.txt", PlainTextFileType.INSTANCE, " First paragraph \n \n \t Second paragraph\n\n\n"); assertEquals("First paragraph", TextExtractor.findTextAt(file, 2, TextContent.TextDomain.ALL).toString()); assertEquals("Second paragraph", TextExtractor.findTextAt(file, 40, TextContent.TextDomain.ALL).toString()); }