Testado com mongodb-3.4.2 e mongo-java-driver-3.4.2.jar
(1) Usar MongoCredential
MongoCredential credential = MongoCredential.createCredential("user", "database", "passwd".toCharArray());
MongoClient mongoClient = new MongoClient(new ServerAddress("localhost", 27017), Arrays.asList(credential));
MongoDatabase db = mongoClient.getDatabase( "test" );
MongoCollection collection = db.getCollection("mycol");
FindIterable fi = collection.find();
MongoCursor cursor = fi.iterator();
(2) Usar MongoClientURI
MongoClientURI uri = new MongoClientURI("mongodb://user:[email protected]:27017/?authSource=test");
MongoClient mongoClient = new MongoClient(uri);
Existem algumas formas variantes para usar MongoCredential e MongoClientURI para diferentes mecanismos de autenticação, verifique aqui para detalhes