A couple of general purpose test utilities