Suggest modifying this to more than one doc to check on removal of error docs if that is what we want:
invalid_doc = {'$invalid-key' => 1}
invalid_docs = [invalid_doc]
doc_ids, error_docs = @@test.insert(invalid_docs, :collect_on_error => true) 
...
assert_equal [], invalid_docs