I feel in this case this helper function is obscuring an important detail of the test, which is how doc and doc1 are related. I'd write out the document creation in full--it should still be a one-liner.