add test for DocumentImpl