Add an UpdateRequest example to Java API doc

Closes #7083.
Better to give an actual example of a script