Add an UpdateRequest example to Java API doc

Closes #7083.
I think we should use real examples here not `foo` or `bar` can you come up with something?