void () { VirtualFile virtualFile = findVirtualFile(BASE_PATH + "/" + "surrogate.txt"); virtualFile.setCharset(StandardCharsets.UTF_8); configureByExistingFile(virtualFile); final Document document = Objects.requireNonNull(FileDocumentManager.getInstance().getDocument(virtualFile)); assertFalse(FileDocumentManager.getInstance().isDocumentUnsaved(document)); assertEquals(StandardCharsets.UTF_8, virtualFile.getCharset()); assertEmpty(doHighlighting()); }