In order to test and replicate Out of Memory issue on my local system, I'm thinking of creating a huge response body ( in string format)which ideally should exceed the heap memory of JVM.
Is it possible to create a very large string of around 2GB and then assign it to a response entity?
Please help.