Improved test utilities.