... function. For more advanced configuration and authentication, see the documentation for mongo. To insert a document into a collection, first retrieve a Database and then Collection instance from the Client. The Collection instance can then be used to insert documents. The driver tests can be run against several database configurations. The most simple configuration is a standalone mongod with no auth, no ssl, and no compression.