Resolve DBRef into Json
You have to import the DBRef Codec for it to print it, if u want it in a document json style you need to write your own Codec for DBRef and add it to the codecregistry you give toJson().
e.g.
CodecRegistry codecRegistry = CodecRegistries.fromRegistries(MongoClient.getDefaultCodecRegistry());
-------
final DocumentCodec codec = new DocumentCodec(codecRegistry, new BsonTypeClassMap());
-------
System.out.println(document.toJson(codec));