def replace_one(filter, replacement, options = {})
      find(filter, options).replace_one(replacement, options)
    end
def replace_one(filter, replacement, options = {})
      find(filter, options).replace_one(replacement, options)
    end
Replaces a single document in the collection with the new document.

 @example Replace a single document.
   collection.replace_one({ name: 'test' }, { name: 'test1' })

 @param [ Hash ] filter The filter to use.
 @param [ Hash ] replacement The replacement document..
 @param [ Hash ] options The options.

 @option options [ true, false ] :upsert Whether to upsert if the
   document doesn't exist.
 @option options [ true, false ] :bypass_document_validation Whether or
   not to skip document level validation.
 @option options [ Hash ] :collation The collation to use.
 @option options [ Session ] :session The session to use.

 @return [ Result ] The response from the database.

 @since 2.1.0