I shamelessly and thoughtlessly copied this straight from the platform tests.