Fixed all warnings, by completely porting tests to new API. Removed test for NilDocumentBody, it is not valid for the new API