General purpose test utilities.