add unit test for document object