Configuring the Custom CodecRegistry worked great for me. All work with documents was reduced to working with Java POJOs.
You can get configurations and usability examples here: https://mongodb.github.io/mongo-java-driver/3.7/driver/getting-started/quick-start-pojo/ https://www.mongodb.com/developer/languages/java/java-mapping-pojos/