wip [ci skip]

* Fix unit tests
* Use same pattern for DocumentProxy