am 972b7282: Merge "Rewrite tests and add tests that demonstrate a bug"

* commit '972b728220e3d85eb549aa3451e872f5a06e25c1':
  Rewrite tests and add tests that demonstrate a bug