Test get document

Initial tests for get_document_or_404 as suggested in #4760 


Do we have a better way to do these sort of database set up with couch?