Update the test to ensure OutOfMemoryError is thrown as intended