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