code: public <ResultT> ResultT findOneAndUpdate(final Bson filter,
                                       final Bson update,
                                       final Class<ResultT> resultClass) {
      return operations.findOneAndModify(
              "findOneAndUpdate",
              filter,
              update,
              new RemoteFindOneAndModifyOptions(),
              resultClass).execute(service);
  
    }
docs: Finds a document in the collection and performs the given update.
  
  @param filter      the query filter
  @param update      the update document
  @param resultClass the class to decode each document into
  @param <ResultT>   the target document type of the iterable.
  @return the resulting document