Out of memory in Elasticsearch

Hi Team,
We have seen out of memory messages in one of our cluster logs with
"java.lang.OutOfMemoryError: Java heap space"
I am trying to understand on
What are the different kinds of OutOfMemory messages occur in the logs?
Is it always printed in the logs or is there a file created for OutOfMemory issues?
Other than the above message is there any other pattern printed in the logs?

I want to test my ES cluster with OutOfMemory exceptions. I would like to explore the options to obtain the same.
What settings would help me create the exceptions?

Can someone please help me here. Thanks

@warkolm:
Since this was closed. I would like to know different kind of ways to get the Out Of Memory.