add `EditSession(Document document, String mode)` ctor with test