tidy up returns
basic tests for embedded doc
entity tests