Tests the various ways that an OutOfMemoryError can be constructed and thrown.