Fix DownstreamCreatorIT for NoteDb

One semantic difference between ReviewDb and NoteDb is that NoteDb does
not always create implicit 0 votes when a reviewer is added. These tests
were checking for a 0 vote primarily in order to verify the
autogenerated tags; a more direct way of testing this is checking for
the actual ChangeMessage we expect the plugin to create. Another
consequence is that some votes are missing rather than being zero, so
fix those asserts.

A final very non-obvious issue is that ChangeApi instances are generally
not safe to reuse in the presence of mutations behind their back.
Sometimes it works and sometimes it doesn't; it happens that it worked
more often under ReviewDb than under NoteDb. Fix this by extracting more
helper methods and re-reading the change given an ID, rather than just
reusing a ChangeApi instance.

Note that these fixes are purely to make the tests pass under NoteDb.
The plugin has actually been running exclusively under NoteDb on hosts for almost two years, so we are reasonably
confident that the updated semantics described in the tests are

Change-Id: Ic43ee09f98ba1e91a0737ab861d9053c368d50b8
1 file changed
tree: 6acba0d0812db656c0eb59c585fd79c0251bead8
  1. .gitignore
  2. BUILD
  4. LICENSE-re2j
  5. external_plugin_deps.bzl
  6. src/