More improvements to the test helpers.