java: Make testDatabaseWatchWithContextCancel more deterministic

It seems that sometimes the cancel is executed too late. This change
makes sure we call the cancel before we attempt to read from the
watch.

Change-Id: I7793c0c0017f8f85835a4121e4b1faa96d03f69a
1 file changed