void () { // need to be physical file VirtualFile vf = VfsTestUtil.createFile(getSourceRoot(), "x.txt", "blah\nblah2\nblah3"); RangeMarker marker = LazyRangeMarkerFactory.getInstance(getProject()).createRangeMarker(vf, 1, 2, true); assertNull(FileDocumentManager.getInstance().getCachedDocument(vf)); document = FileDocumentManager.getInstance().getDocument(vf); assertNotNull(document); assertTrue(marker.isValid()); assertEquals(7, marker.getStartOffset()); assertEquals(7, marker.getEndOffset()); }