Replaced the obsolete Connection with MongoClient.