void () { psiFile = createFile("x.txt", ""); LazyRangeMarkerFactoryImpl factory = (LazyRangeMarkerFactoryImpl)LazyRangeMarkerFactory.getInstance(getProject()); VirtualFile virtualFile = psiFile.getVirtualFile(); assertEquals("", psiFile.getText()); RangeMarker marker = factory.createRangeMarker(virtualFile, 1 /* invalid offset */); document = FileDocumentManager.getInstance().getDocument(virtualFile); replaceString(document, 0, 0, "\n\t\n"); assertEquals("\n\t\n", document.getText()); assertTrue(marker.toString(), marker.isValid()); assertEquals(0, marker.getStartOffset()); }