Unit test for document service