added document model
refactoring unit testing for document